/*
 Theme Name:   Lightning Child
 Theme URI:    https://lightning.vektor-inc.co.jp/
 Description:  Lightning の子テーマ
 Author:       Your Name
 Author URI:   https://example.com/
 Template:     lightning
 Version:      1.0.0
 Text Domain:  lightning-child
*/

/* ================================================
   WooCommerce 商品ページ: 全幅レイアウト
   ================================================ */

/* ページヘッダー（ショップバナー）を非表示 */
.single-product .page-header {
    display: none;
}

/* パンくずリストの上余白調整 */
.single-product .breadcrumb {
    margin-top: 10px;
}

/* コンテンツ幅を広げる（左右余白を少なく） */
.single-product .site-body-container {
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
}

/* メインコンテンツの幅を最大化・中央寄せ */
.single-product .main-section {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    float: none;
}

/* サイドバーを非表示にして1カラム化 */
.single-product .side-section {
    display: none;
}

/* 商品説明エリアの幅を広げる */
.single-product .woocommerce-product-content,
.single-product .woocommerce-Tabs-panel {
    max-width: 100%;
}

/* 商品画像と情報の配置を広く */
.single-product div.product {
    max-width: 1200px;
    margin: 0 auto;
}

/* サイトコンテンツの上下余白を調整 */
.single-product .site-body {
    padding-top: 0;
}

/* ================================================
   WooCommerce ショップ一覧ページ: 中央寄せ・全幅
   ================================================ */

/* ショップページのページヘッダーを非表示 */
.post-type-archive-product .page-header,
.tax-product_cat .page-header {
    display: none;
}

/* ショップページのコンテンツ幅 */
.post-type-archive-product .site-body-container,
.tax-product_cat .site-body-container {
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
}

/* ショップページのメインセクション中央寄せ */
.post-type-archive-product .main-section,
.tax-product_cat .main-section {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    float: none;
}

/* ショップページのサイドバー非表示 */
.post-type-archive-product .side-section,
.tax-product_cat .side-section {
    display: none;
}

/* ショップページの上余白調整 */
.post-type-archive-product .site-body,
.tax-product_cat .site-body {
    padding-top: 0;
}

/* ================================================
   ヘッダーツール（検索・ログイン・カート）
   ================================================ */

/* ヘッダーコンテナをflexにしてツールを右端へ */
#site-header-container {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

/* ナビを中央〜右に配置 */
#site-header-container .global-nav {
    flex: 1;
}

/* ツールをナビの後（右端）に表示 */
.header-tools {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 30px;
    flex-shrink: 0;
    order: 99;
}

.header-tools__search form {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.header-tools__search-input {
    border: none;
    padding: 6px 10px;
    font-size: 14px;
    width: 160px;
    outline: none;
}

.header-tools__search-btn {
    border: none;
    background: none;
    padding: 6px 8px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
}

.header-tools__search-btn:hover {
    color: #007bff;
}

.header-tools__link {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
}

.header-tools__link:hover {
    color: #007bff;
}

.header-tools__cart {
    position: relative;
}

.header-tools__cart-count {
    background: #007bff;
    color: #fff;
    font-size: 11px;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -8px;
    right: -10px;
}

/* レスポンシブ: タブレット */
@media (max-width: 991px) {
    .header-tools {
        gap: 10px;
    }
    .header-tools__search-input {
        width: 100px;
    }
    .header-tools__link span {
        display: none;
    }
}

/* レスポンシブ: モバイル（参考サイトに合わせる） */
@media (max-width: 767px) {
    /* header-toolsはモバイルで完全非表示（ハンバーガーメニュー内に移動） */
    .header-tools {
        display: none !important;
    }

    /* ヘッダーバーの検索アイコン（ハンバーガーの左） */
    .mobile-search-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 5px;
        right: 50px;
        z-index: 10000;
        width: 34px;
        height: 34px;
        cursor: pointer;
        color: #333;
    }
    .mobile-search-icon svg {
        width: 20px;
        height: 20px;
    }

    /* 管理バーがある場合の位置調整 */
    .admin-bar .mobile-search-icon {
        top: 51px;
    }

    /* モバイルナビ内の検索フォーム */
    .vk-mobile-nav .widget_search {
        padding: 15px;
    }
    .vk-mobile-nav .widget_search .search-field {
        width: 100%;
        padding: 10px 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 16px;
        box-sizing: border-box;
        background: #fff;
    }

    /* モバイルナビ内のLoginボタン */
    .vk-mobile-nav .mobile-nav-login {
        display: block;
        margin: 15px;
        padding: 12px 20px;
        background: #333;
        color: #fff;
        text-align: center;
        text-decoration: none;
        border-radius: 4px;
        font-size: 14px;
        font-weight: bold;
    }
    .vk-mobile-nav .mobile-nav-login:hover {
        background: #555;
        color: #fff;
    }
    .vk-mobile-nav .mobile-nav-login svg {
        vertical-align: middle;
        margin-right: 5px;
    }
}

/* PC以上ではモバイル検索アイコンを非表示 */
.mobile-search-icon {
    display: none;
}
