/*
Theme Name: climbmax-child
Theme URI:  https://climbmax.online
Author:     climbmax
Template:   glue_free002
Version:    1.0.0
*/

/* ══════════════════════════════════════════════
   Custom Properties
══════════════════════════════════════════════ */
:root {
    --c-primary:  #003087;
    --c-accent:   #C8A951;
    --c-bg:       #ffffff;
    --c-text:     #1a1a1a;
    --c-muted:    #888888;
    --c-border:   #e0e0e0;
    --c-surface:  #f5f5f5;
    --radius:     4px;
    --content-w:  1200px;
}

/* ══════════════════════════════════════════════
   Reset / Base
══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--c-text);
    background: var(--c-bg);
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-accent); }

/* ══════════════════════════════════════════════
   Header
══════════════════════════════════════════════ */
.k2-header {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 200;
}

.k2-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 24px;
    height: 64px;
    max-width: var(--content-w);
    margin: 0 auto;
}

/* ロゴ（中央列）
   PCではハンバーガーが display:none になるため
   grid-column を明示してセンターを保証する ─────────── */
.k2-header__logo,
.k2-header__inner .custom-logo-link {
    grid-column: 2;
    justify-self: center;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.15s;
}
.k2-header__logo:hover,
.k2-header__inner .custom-logo-link:hover { opacity: 0.75; }

/* カスタムロゴ画像サイズ */
.k2-header__inner .custom-logo-link .custom-logo {
    height: 40px;
    width: auto;
    display: block;
}

/* テキストフォールバック */
.k2-header__site-title {
    color: var(--c-primary);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

/* アイコン（右列） */
.k2-header__icons {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 16px;
}

.k2-header__cart-btn {
    position: relative;
    color: var(--c-text);
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.15s;
}
.k2-header__cart-btn:hover { opacity: 0.7; }

.k2-header__cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--c-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.k2-hamburger {
    justify-self: start;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: opacity 0.15s;
}
.k2-hamburger:hover { opacity: 0.7; }

.k2-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--c-text);
    border-radius: 1px;
}

/* ══════════════════════════════════════════════
   ドロワーナビゲーション
══════════════════════════════════════════════ */
.k2-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 300;
}
.k2-drawer-overlay.is-visible { display: block; }

.k2-drawer {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100%;
    background: var(--c-bg);
    border-left: 1px solid var(--c-border);
    z-index: 400;
    transition: right 0.25s ease;
    overflow-y: auto;
    padding: 24px 0;
}
.k2-drawer.is-open { left: 0; }

.k2-drawer__close {
    display: block;
    text-align: right;
    padding: 0 20px 16px;
    font-size: 20px;
    cursor: pointer;
    color: var(--c-muted);
    background: none;
    border: none;
}

.k2-drawer .menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.k2-drawer .menu li { border-bottom: 1px solid var(--c-border); }
.k2-drawer .menu a {
    display: block;
    padding: 12px 20px;
    color: var(--c-text);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.1s, background 0.1s;
}
.k2-drawer .menu a:hover {
    background: var(--c-surface);
    color: var(--c-primary);
}

/* ドロワー内ナビ（サイドバーと統一構成） */

/* すべてリンク */
.k2-drawer__all {
    padding: 12px 20px;
    border-bottom: 1px solid var(--c-border);
}
.k2-drawer__all a {
    font-size: 13px;
    color: var(--c-text);
    text-decoration: none;
}
.k2-drawer__all a:hover { color: var(--c-primary); }

/* セクション（スマホホルダー / フットレスト） */
.k2-drawer__section {
    border-bottom: 1px solid var(--c-border);
}

/* セクション見出しリンク */
.k2-drawer__section-title {
    display: block;
    padding: 12px 20px 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--c-text);
    text-decoration: none;
    border-left: 3px solid var(--c-primary);
    background: var(--c-surface);
}
.k2-drawer__section-title:hover { color: var(--c-primary); }

/* 車種リスト */
.k2-drawer__car-list {
    list-style: none;
    margin: 0;
    padding: 0 0 4px 0;
}
.k2-drawer__car-list li {
    border-bottom: 1px solid #f0f0f0;
}
.k2-drawer__car-list a {
    display: block;
    padding: 9px 20px 9px 28px;
    font-size: 13px;
    color: var(--c-text);
    text-decoration: none;
    transition: color 0.1s, background 0.1s;
}
.k2-drawer__car-list a:hover {
    color: var(--c-primary);
    background: var(--c-surface);
}

/* ══════════════════════════════════════════════
   ヒーローバナー
══════════════════════════════════════════════ */
.k2-hero-banner {
    width: 100%;
    overflow: hidden;
    line-height: 0;
}
.k2-hero-banner__img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 360px;
    object-fit: cover;
}

/* ══════════════════════════════════════════════
   コンテンツレイアウト
══════════════════════════════════════════════ */

/* PC: サイドバー + メイン（2カラム） */
.k2-layout {
    display: flex;
    gap: 32px;
    max-width: var(--content-w);
    margin: 0 auto;
    padding: 24px 20px;
}

.k2-sidebar {
    width: 200px;
    flex-shrink: 0;
}

.k2-main {
    flex: 1;
    min-width: 0;
}

/* サイドバーなしページ */
.k2-container {
    max-width: var(--content-w);
    margin: 0 auto;
    padding: 24px 20px;
}

/* ══════════════════════════════════════════════
   サイドバー（PC のみ表示）
══════════════════════════════════════════════ */

/* すべてリンク */
.k2-sidebar__all {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--c-border);
}
.k2-sidebar__all-link {
    font-size: 13px;
    color: var(--c-text);
    text-decoration: none;
    transition: color 0.15s;
}
.k2-sidebar__all-link:hover,
.k2-sidebar__all-link.is-active {
    color: var(--c-primary);
    font-weight: 700;
}

/* セクション（スマホホルダー / フットレスト） */
.k2-sidebar__section {
    margin-bottom: 24px;
}

/* セクション見出しリンク */
.k2-sidebar__section-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--c-text);
    text-decoration: none;
    padding: 6px 0 8px;
    border-bottom: 2px solid var(--c-primary);
    margin-bottom: 4px;
    transition: color 0.15s;
}
.k2-sidebar__section-title:hover { color: var(--c-primary); }
.k2-sidebar__section-title.is-active { color: var(--c-primary); }

/* 車種リスト */
.k2-sidebar__car-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 8px;
    border-left: 2px solid var(--c-border);
}
.k2-sidebar__car-list li {
    border-bottom: 1px solid var(--c-border);
}
.k2-sidebar__car-link {
    display: block;
    padding: 7px 4px;
    font-size: 12px;
    color: var(--c-muted);
    text-decoration: none;
    transition: color 0.15s, padding-left 0.15s;
}
.k2-sidebar__car-link:hover { color: var(--c-primary); padding-left: 6px; }
.k2-sidebar__car-link.is-active {
    color: var(--c-primary);
    font-weight: 700;
}

.k2-page-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px;
}
.k2-page-subtitle {
    font-size: 12px;
    color: var(--c-muted);
    margin: 0 0 20px;
    letter-spacing: 0.06em;
}
.k2-page-title-row {
    border-bottom: 1px solid var(--c-border);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

/* ══════════════════════════════════════════════
   モバイルタブフィルター
══════════════════════════════════════════════ */
.k2-tab-filter {
    margin-bottom: 20px;
    overflow: hidden;
}
.k2-tab-filter__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.k2-tab {
    display: inline-block;
    padding: 5px 14px;
    background: var(--c-surface);
    color: var(--c-text);
    border: 1px solid var(--c-border);
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.k2-tab:hover,
.k2-tab.is-active {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
}

/* ══════════════════════════════════════════════
   商品グリッド（SP: 2カラム / PC: 4カラム）
══════════════════════════════════════════════ */
.k2-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
}
@media ( min-width: 769px ) {
    .k2-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px 16px;
    }
    ul.products {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* 商品カード */
.k2-product-card__img-wrap {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--c-surface);
    margin-bottom: 10px;
}
.k2-product-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.k2-product-card:hover .k2-product-card__img { transform: scale(1.04); }

.k2-product-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}
.k2-product-card__placeholder svg { width: 48px; height: 48px; }

.k2-product-card__name {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--c-text);
}
.k2-product-card__name:hover { text-decoration: underline; }

.k2-product-card__price {
    font-size: 13px;
    color: var(--c-text);
}
.k2-product-card__price .woocommerce-Price-amount { color: var(--c-text); }

.k2-product-card__vehicles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.k2-vehicle-tag {
    display: inline-block;
    padding: 2px 7px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    font-size: 10px;
    color: var(--c-muted);
    line-height: 1.6;
    word-break: break-all;
}

/* ══════════════════════════════════════════════
   WooCommerce 商品ループ（archive-product）
══════════════════════════════════════════════ */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px 20px !important;
    list-style: none !important;
    margin: 0 0 2rem !important;
    padding: 0 !important;
}
ul.products li.product {
    margin: 0 !important;
    float: none !important;
    padding: 0 !important;
}
ul.products li.product a.woocommerce-loop-product__link {
    display: block;
    text-decoration: none;
    color: inherit;
}
ul.products li.product img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--c-surface);
    margin-bottom: 10px;
    transition: transform 0.3s;
}
ul.products li.product:hover img { transform: scale(1.04); }
ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px !important;
    font-weight: 400 !important;
    padding: 0 !important;
    margin: 0 0 4px !important;
    color: var(--c-text);
}
ul.products li.product .price {
    font-size: 13px !important;
    color: var(--c-text) !important;
    display: block;
    margin-bottom: 10px;
}
ul.products li.product .price .amount { color: var(--c-text) !important; }
ul.products li.product a.button,
ul.products li.product button.button {
    display: block;
    width: 100%;
    padding: 8px;
    background: var(--c-primary) !important;
    color: #fff !important;
    font-size: 12px;
    text-align: center;
    border: none;
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}
ul.products li.product a.button:hover { background: var(--c-accent) !important; }

/* アーカイブ見出し・件数 */
.woocommerce-products-header__title.page-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--c-primary);
}
.woocommerce-result-count {
    font-size: 12px;
    color: var(--c-muted);
    margin-bottom: 1rem;
    display: block;
}

/* ══════════════════════════════════════════════
   WooCommerce 商品詳細（single-product）
══════════════════════════════════════════════ */
.woocommerce div.product {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
}
.woocommerce div.product .woocommerce-product-gallery {
    width: 46%;
    flex-shrink: 0;
}
.woocommerce div.product .summary {
    flex: 1;
    min-width: 260px;
    background: #fff;
    padding: 0;
}

/* 商品タイトル */
.woocommerce div.product .product_title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.45;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--c-border);
}

/* 価格 */
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--c-text);
    display: block;
    margin-bottom: 6px;
}
.woocommerce div.product p.price .amount,
.woocommerce div.product span.price .amount { color: var(--c-text); }

.woocommerce div.product .woocommerce-variation-price .price {
    font-size: 1.4rem;
    color: var(--c-text);
}

/* 適合車種 */
.k2-compatible-vehicles {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 10px 14px;
    margin: 10px 0 14px;
}

.k2-compatible-vehicles__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--c-muted);
    margin: 0 0 4px;
}

.k2-compatible-vehicles__text {
    font-size: 13px;
    line-height: 1.65;
    color: var(--c-text);
    margin: 0;
}

/* 商品説明（タブなし直接表示） */
.k2-product-description {
    padding: 2rem 0;
    border-top: 1px solid var(--c-border);
    line-height: 1.85;
    font-size: 14px;
    color: var(--c-text);
}
.k2-product-description p { margin-bottom: 1em; }
.k2-product-description p:last-child { margin-bottom: 0; }
.k2-product-description a { color: var(--c-primary); text-decoration: underline; }

/* ── 商品詳細カスタムタブ ── */
.k2-tabs {
    margin-top: 2rem;
    border-top: 2px solid var(--c-border);
    padding-top: 0;
    clear: both;
}

.k2-tabs__nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--c-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.k2-tabs__nav::-webkit-scrollbar { display: none; }

.k2-tabs__btn {
    flex-shrink: 0;
    padding: 12px 18px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--c-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.k2-tabs__btn:hover { color: var(--c-primary); }
.k2-tabs__btn.is-active {
    color: var(--c-primary);
    border-bottom-color: var(--c-primary);
}

.k2-tabs__panel {
    display: none;
    padding: 1.25rem 0;
    font-size: 14px;
    line-height: 1.85;
    color: var(--c-text);
}
.k2-tabs__panel.is-active { display: block; }
.k2-tabs__panel p { margin-bottom: 0.75em; }
.k2-tabs__panel p:last-child { margin-bottom: 0; }

/* オプションタブ */
.k2-tab-option__item {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--c-border);
    font-size: 14px;
}
.k2-tab-option__item:first-child { border-top: 1px solid var(--c-border); }
.k2-tab-option__name { flex: 1; font-weight: 700; }
.k2-tab-option__price { color: var(--c-text); white-space: nowrap; }

/* 商品説明（短い説明文） */
.woocommerce div.product .woocommerce-product-details__short-description {
    font-size: 12px;
    color: var(--c-text);
    margin-bottom: 1.5rem;
}

/* バリエーション選択テーブル */
.woocommerce div.product table.variations {
    width: 100%;
    border: none;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
.woocommerce div.product table.variations tr {
    border-bottom: 1px solid var(--c-border);
}
.woocommerce div.product table.variations th,
.woocommerce div.product table.variations td {
    padding: 10px 0;
    border: none;
    vertical-align: middle;
}
.woocommerce div.product table.variations th {
    width: 110px;
    min-width: 110px;
    padding-right: 12px;
}
.woocommerce div.product table.variations label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--c-muted);
    letter-spacing: 0.04em;
}
.woocommerce div.product table.variations .value select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.15s;
}
.woocommerce div.product table.variations .value select:focus {
    outline: none;
    border-color: var(--c-primary);
}
/* リセットリンクを非表示 */
.woocommerce div.product table.variations .reset_variations {
    display: none !important;
}

/* 在庫 */
.woocommerce div.product .stock { font-size: 12px; margin-bottom: 0.75rem; }

/* 数量 */
.woocommerce div.product .quantity .qty {
    width: 72px;
    padding: 10px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: 1rem;
    text-align: center;
}

/* カートに追加ボタン */
.woocommerce .single_add_to_cart_button.button {
    display: block;
    width: 100%;
    padding: 14px !important;
    background: var(--c-text) !important;
    color: #fff !important;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    letter-spacing: 0.04em;
    text-align: center;
    margin-top: 12px;
}
.woocommerce .single_add_to_cart_button.button:hover {
    background: var(--c-primary) !important;
}

/* カートフォーム */
.woocommerce .cart { margin: 20px 0; }
.woocommerce .quantity { margin-bottom: 12px; }

/* タブ */
.woocommerce div.product .woocommerce-tabs {
    clear: both;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--c-border);
}
.woocommerce div.product .woocommerce-tabs ul.tabs {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    border-bottom: 2px solid var(--c-border);
    display: flex;
    gap: 0;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li {
    border: none;
    background: transparent;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--c-muted);
    text-decoration: none;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--c-primary); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
    border-bottom: 2px solid var(--c-primary);
    margin-bottom: -2px;
}

/* 関連商品 */
.woocommerce .related.products { margin-top: 3rem; clear: both; }
.woocommerce .related.products > h2 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--c-border);
}

/* 関連商品グリッド: 3カラム固定（WC デフォルト float を上書き） */
.woocommerce .related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px 20px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    float: none !important;
}
.woocommerce .related.products ul.products::before,
.woocommerce .related.products ul.products::after { display: none !important; }
.woocommerce .related.products ul.products li.product {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: none !important;
}

/* ══════════════════════════════════════════════
   カートページ
══════════════════════════════════════════════ */

/* カート空時の商品一覧を非表示 */
.wc-block-empty-cart__products-container,
.wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-new,
.wp-block-woocommerce-empty-cart-block .wc-block-grid,
.wp-block-woocommerce-empty-cart-block ul.wc-block-grid__products,
.woocommerce-cart .woocommerce-empty-cart ~ .products { display: none !important; }

/* カートテーブル */
.woocommerce-page table.shop_table.cart {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 1.5rem;
}
.woocommerce-page table.shop_table.cart th {
    padding: 10px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--c-muted);
    text-align: left;
    border-bottom: 2px solid var(--c-border);
    white-space: nowrap;
    background: none;
}
.woocommerce-page table.shop_table.cart td {
    padding: 14px 8px;
    border-bottom: 1px solid var(--c-border);
    vertical-align: middle;
}
.woocommerce-page table.shop_table.cart .product-thumbnail img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
}
.woocommerce-page table.shop_table.cart .product-name a {
    font-weight: 700;
    color: var(--c-text);
}
.woocommerce-page table.shop_table.cart .product-remove a {
    font-size: 20px;
    color: var(--c-muted);
    text-decoration: none;
    transition: color 0.15s;
    background: none;
}
.woocommerce-page table.shop_table.cart .product-remove a:hover { color: #c00; }

/* カートを更新ボタン */
.woocommerce-page .woocommerce-cart-form .actions { padding: 12px 0; text-align: right; }
.woocommerce-page .woocommerce-cart-form .button[name="update_cart"] {
    padding: 8px 18px;
    background: var(--c-surface);
    color: var(--c-muted);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}
.woocommerce-page .woocommerce-cart-form .button[name="update_cart"]:hover {
    background: var(--c-border);
}

/* カート合計エリア */
.woocommerce-page .cart-collaterals {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
    clear: both;
}
.woocommerce-page .cart_totals {
    width: 360px;
    min-width: 260px;
    float: none !important;
}
.woocommerce-page .cart_totals h2 {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 1rem;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--c-primary);
}
.woocommerce-page .cart_totals table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 1rem;
}
.woocommerce-page .cart_totals table th,
.woocommerce-page .cart_totals table td {
    padding: 10px 0;
    border-bottom: 1px solid var(--c-border);
    vertical-align: middle;
    background: none;
}
.woocommerce-page .cart_totals table th {
    font-size: 12px;
    font-weight: 700;
    color: var(--c-muted);
    width: 45%;
}
.woocommerce-page .cart_totals .order-total th,
.woocommerce-page .cart_totals .order-total td {
    font-weight: 700;
    font-size: 1rem;
    color: var(--c-text);
    border-bottom: none;
}

/* 購入手続きに進むボタン — カートに追加と同スタイル */
.woocommerce-page .wc-proceed-to-checkout { margin-top: 0.5rem; }
.woocommerce-page .wc-proceed-to-checkout a.checkout-button,
.woocommerce-page .wc-proceed-to-checkout .checkout-button {
    display: block !important;
    width: 100% !important;
    padding: 14px !important;
    background: var(--c-text) !important;
    color: #fff !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    border: none !important;
    border-radius: var(--radius) !important;
    text-align: center !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}
.woocommerce-page .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-page .wc-proceed-to-checkout .checkout-button:hover {
    background: var(--c-primary) !important;
    color: #fff !important;
}

/* ══════════════════════════════════════════════
   パンくず / 通知
══════════════════════════════════════════════ */
.woocommerce-breadcrumb {
    font-size: 12px;
    color: var(--c-muted);
    margin-bottom: 1.25rem;
}
.woocommerce-breadcrumb a { color: var(--c-muted); }
.woocommerce-breadcrumb a:hover { color: var(--c-primary); }
.woocommerce-notices-wrapper { margin-bottom: 1rem; }

/* Empty state */
.k2-no-products {
    grid-column: 1 / -1;
    padding: 3rem;
    text-align: center;
    color: var(--c-muted);
    font-size: 0.9rem;
}

/* ══════════════════════════════════════════════
   Footer
══════════════════════════════════════════════ */
.k2-footer {
    background: var(--c-bg);
    border-top: 1px solid var(--c-border);
    text-align: center;
    padding: 1.5rem;
    font-size: 11px;
    color: var(--c-muted);
    margin-top: 4rem;
}
.k2-footer p { margin: 0; }

.k2-footer__links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.k2-footer__links a {
    font-size: 12px;
    color: var(--c-muted);
    text-decoration: none;
}
.k2-footer__links a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════
   Responsive ― PC（769px 以上）
══════════════════════════════════════════════ */
@media ( min-width: 769px ) {
    /* ドロワー・SP タブ・ハンバーガーは PC で非表示 */
    .k2-drawer,
    .k2-drawer-overlay,
    .k2-tab-filter,
    .k2-hamburger { display: none !important; }
}

/* ══════════════════════════════════════════════
   Responsive ― タブレット（〜900px）
══════════════════════════════════════════════ */
@media ( max-width: 900px ) {
    .k2-layout { gap: 24px; }
    .k2-sidebar { width: 170px; }

    .k2-product-grid          { gap: 16px 12px; }
    ul.products                { gap: 16px 12px !important; }

    .woocommerce div.product   { gap: 1.5rem; }
    .woocommerce div.product .woocommerce-product-gallery { width: 44%; }
}

/* ══════════════════════════════════════════════
   Responsive ― スマホ（〜768px）
══════════════════════════════════════════════ */
@media ( max-width: 768px ) {
    :root { --content-w: 100%; }

    .k2-header__inner { padding: 0 16px; height: 56px; }

    /* SP: サイドバーレイアウトを縦積みに変更 */
    .k2-layout {
        display: block;
        padding: 16px;
    }
    .k2-sidebar  { display: none; }

    .k2-container     { padding: 16px; }

    .k2-product-grid  { gap: 12px 10px; }
    ul.products        { gap: 12px 10px !important; }

    /* 商品詳細: 縦積み */
    .woocommerce div.product { flex-direction: column; padding: 0; }
    .woocommerce div.product .woocommerce-product-gallery { width: 100%; }
    .woocommerce div.product .summary { padding: 16px 0; }

    .woocommerce div.product p.price,
    .woocommerce div.product span.price { font-size: 1.4rem; }

    .woocommerce .single_add_to_cart_button.button {
        padding: 16px !important;
        font-size: 1rem;
    }

    .woocommerce div.product .woocommerce-tabs { margin-top: 24px; }

    /* ── カートページ SP ── */
    .woocommerce-page table.shop_table.cart thead { display: none !important; }

    .woocommerce-page table.shop_table.cart,
    .woocommerce-page table.shop_table.cart tbody,
    .woocommerce-page table.shop_table.cart tr,
    .woocommerce-page table.shop_table.cart td { display: block !important; }

    .woocommerce-page table.shop_table.cart tr.cart_item {
        display: grid !important;
        grid-template-columns: 72px 1fr;
        grid-template-areas:
            "thumb  name"
            "thumb  price"
            "thumb  qty"
            "sub    sub"
            "remove remove";
        gap: 4px 12px;
        align-items: start;
        border: 1px solid var(--c-border);
        border-radius: var(--radius);
        padding: 12px;
        margin-bottom: 12px;
    }
    .woocommerce-page table.shop_table.cart td {
        padding: 0 !important;
        border: none !important;
    }
    .woocommerce-page table.shop_table.cart .product-thumbnail { grid-area: thumb; }
    .woocommerce-page table.shop_table.cart .product-name      { grid-area: name;  font-size: 13px; font-weight: 700; }
    .woocommerce-page table.shop_table.cart .product-price     { grid-area: price; font-size: 12px; color: var(--c-muted); }
    .woocommerce-page table.shop_table.cart .product-quantity  { grid-area: qty; }
    .woocommerce-page table.shop_table.cart .product-subtotal  {
        grid-area: sub;
        font-weight: 700;
        text-align: right;
        padding-top: 8px !important;
        border-top: 1px solid var(--c-border) !important;
    }
    .woocommerce-page table.shop_table.cart .product-remove {
        grid-area: remove;
        text-align: right;
        padding-top: 4px !important;
    }
    .woocommerce-page table.shop_table.cart .product-thumbnail img { width: 72px; height: 72px; }

    /* カート合計 SP */
    .woocommerce-page .cart-collaterals { display: block !important; }
    .woocommerce-page .cart_totals { width: 100% !important; float: none !important; }
}

/* ══════════════════════════════════════════════
   車種検索フォーム（TOPページ）
══════════════════════════════════════════════ */
.k2-vehicle-search {
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    padding: 32px 20px;
}
.k2-vehicle-search__inner {
    max-width: var(--content-w);
    margin: 0 auto;
}
.k2-vehicle-search__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 16px;
    letter-spacing: 0.05em;
}
.k2-vehicle-search__form {
    width: 100%;
}
.k2-vehicle-search__row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: center;
}
.k2-search-select {
    flex: 1;
    min-width: 160px;
    padding: 10px 36px 10px 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    -webkit-appearance: none;
    appearance: none;
    font-size: 0.9rem;
    color: var(--c-text);
    cursor: pointer;
    transition: border-color 0.15s;
}
.k2-search-select:focus {
    outline: none;
    border-color: var(--c-text);
}
.k2-search-select:disabled {
    background-color: var(--c-surface);
    color: var(--c-muted);
    cursor: not-allowed;
}
.k2-search-btn {
    padding: 10px 28px;
    background: var(--c-text);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
    font-family: inherit;
}
.k2-search-btn:hover { opacity: 0.8; }

/* ══════════════════════════════════════════════
   車種一覧セクション（TOPページ全幅）
══════════════════════════════════════════════ */
.k2-products-section {
    padding: 40px 20px 60px;
}
.k2-products-section__inner {
    max-width: var(--content-w);
    margin: 0 auto;
}
.k2-products-section__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 24px;
    letter-spacing: 0.05em;
}

/* カテゴリー別セグメント */
.k2-products-segment {
    margin-bottom: 56px;
}
.k2-products-segment:last-child {
    margin-bottom: 0;
}

/* Lボールオプション（取り付け位置と同じドロップダウン形式） */
.k2-options {
    margin-bottom: 20px;
}
.k2-options__title {
    font-weight: 700;
    margin-bottom: 12px;
}
.k2-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--c-border);
}
.k2-option-row__label {
    font-size: 0.9rem;
    flex: 1;
}
.k2-option-row__price {
    color: var(--c-muted);
    font-size: 0.9em;
}
.k2-option-select {
    width: 80px;
    padding: 10px 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.15s;
}
.k2-option-select:focus {
    outline: none;
    border-color: var(--c-primary);
}
.k2-products-segment__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--c-text);
    border-left: 4px solid var(--c-primary);
    padding-left: 12px;
    margin: 0 0 20px;
    letter-spacing: 0.04em;
}

/* 全幅グリッド（サイドバーなし・最大5列） */
.k2-product-grid--wide {
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 600px) {
    .k2-product-grid--wide {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 900px) {
    .k2-product-grid--wide {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (min-width: 1100px) {
    .k2-product-grid--wide {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* アーカイブページ カテゴリタイトル */
.k2-archive-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--c-text);
}

/* パンくずリスト */
.k2-breadcrumb-wrap {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
}
.k2-breadcrumb-wrap .woocommerce-breadcrumb {
    max-width: var(--content-w);
    margin: 0 auto;
    padding: 8px 24px;
    font-size: 12px;
    color: var(--c-muted);
}
.k2-breadcrumb-wrap .woocommerce-breadcrumb a {
    color: var(--c-muted);
    text-decoration: none;
}
.k2-breadcrumb-wrap .woocommerce-breadcrumb a:hover {
    color: var(--c-primary);
    text-decoration: underline;
}

/* 車種検索結果ヘッダー */
.k2-vehicle-result-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.k2-vehicle-result-header .k2-archive-title {
    margin-bottom: 0;
    flex: 1 1 auto;
}
.k2-back-link {
    font-size: 0.85rem;
    color: var(--c-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.k2-back-link:hover { color: var(--c-primary); }

/* MetaSlider 全幅表示 */
.k2-hero-slider {
    width: 100%;
    overflow: hidden;
    line-height: 0;
}
.k2-hero-slider .metaslider,
.k2-hero-slider .ms-slider {
    width: 100% !important;
    max-width: 100% !important;
}
.k2-hero-slider img {
    width: 100% !important;
    height: auto !important;
}

/* PC：スライドショーを 1920×600 のアスペクト比に合わせる */
@media (min-width: 769px) {
    .k2-hero-slider {
        aspect-ratio: 1920 / 600;
    }
    .k2-hero-slider .ms-slide,
    .k2-hero-slider .ms-slide img,
    .k2-hero-slider .metaslider img {
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }
}

@media (max-width: 768px) {
    .k2-vehicle-search__row {
        grid-template-columns: 1fr;
    }
    .k2-search-btn { width: 100%; }
}
