/*
Theme Name: Welcart Basic Child
Template: welcart_basic
Description: あっとわんこ カスタムテーマ
Author: Naoto
Version: 1.3.6
*/

/* ==========================================
   1. ロゴ設定（PC・スマホ共通）
========================================== */
.site-title a {
    display: block;
    width: 300px;
    height: 80px;
    background: url('https://atwanko.com/wp-content/uploads/2024/01/yokonaga-with-R.png') no-repeat center center;
    background-size: contain;
    text-indent: -9999px;
    overflow: hidden;
    white-space: nowrap;
    pointer-events: auto !important;
}
.site-description { display: none; }

/* ==========================================
   2. ヘッダー上部の背景
========================================== */
body header#masthead, 
html body #masthead,
.site-header {
    background-color: #FFFFFF !important;
    background: #FFFFFF !important;
    border-bottom: none !important;
    position: relative !important;
    z-index: 100 !important;
}

#masthead .inner .top-widget-area,
.header-widget-area {
    background: transparent !important;
}

#masthead .inner .top-widget-area a,
.header-widget-area a {
    color: #333333 !important;
    text-decoration: none;
}

#searchform .search-field {
    background-color: #F5F5F5 !important;
    border: 1px solid #CCCCCC !important;
    color: #333333 !important;
}
#searchform .search-submit {
    background-color: #EEEEEE !important;
    color: #333333 !important;
    border: 1px solid #CCCCCC !important;
}

/* ==========================================
   3. PC用メニューバー
========================================== */
html body header#masthead nav,
html body #site-navigation,
html body .main-navigation,
html body .header-nav-container {
    background-color: #FC6C85 !important;
    background: #FC6C85 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

html body .header-nav-container > ul,
html body #site-navigation > div > ul {
    background-color: #FC6C85 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

html body .header-nav-container > ul > li > a, 
html body #site-navigation > ul > li > a {
    color: #FFFFFF !important;
    padding: 10px 15px !important;
    display: block;
    text-decoration: none !important;
}

html body .header-nav-container > ul > li > a:hover, 
html body #site-navigation > ul > li > a:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* ドロップダウン（PC） */
.sub-menu, ul.sub-menu {
    display: none;
    position: absolute;
    z-index: 99999;
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #eee !important;
    min-width: 200px;
}
html body .header-nav-container li:hover > .sub-menu {
    display: block !important;
}
.sub-menu a { color: #333333 !important; }


/* ==========================================
   4. PC表示でのハンバーガーボタン非表示
========================================== */
@media (min-width: 769px) {
    #site-navigation-toggle,
    button.menu-toggle,
    .menu-toggle,
    input.menu-checkbox,
    #site-navigation input[type="checkbox"] {
        display: none !important;
    }
}


/* ==========================================
   5. スマホ表示の修正（配置調整＆色変更）
========================================== */
@media (max-width: 768px) {
    
    /* ヘッダー高さ確保 */
    html body #masthead {
        height: 80px !important;
        position: relative !important;
        overflow: visible !important;
    }

    /* ロゴ設定 */
    .site-title {
        position: absolute !important;
        left: 10px !important;
        top: 15px !important;
        margin: 0 !important;
        width: auto !important;
        z-index: 200 !important;
    }
    .site-title a {
        width: 150px !important;
        height: 50px !important;
        margin: 0 !important;
        background-position: left center !important;
    }

    /* アイコンエリア */
    html body #masthead .inner,
    .header-widget-area {
        pointer-events: none !important; 
        position: static !important;
    }

    html body #masthead .widget,
    #cart-panel, .header-cart,
    #member-panel, .header-member,
    #header-search, .header-search,
    a, button, input {
        pointer-events: auto !important;
        display: block !important;
    }

    /* -------------------------------------------------
       【修正1】アイコン位置の調整（重なり防止）
       カートを右から80pxの位置へ移動（余裕を持たせる）
    ------------------------------------------------- */
    #cart-panel, .header-cart, .widget_usces_cart {
        position: absolute !important;
        top: 25px !important;
        right: 80px !important; /* ここを60px→80pxに変更 */
        margin: 0 !important;
        z-index: 500 !important;
        width: auto !important;
    }
    
    #member-panel, .header-member, .widget_usces_member {
        position: absolute !important;
        top: 25px !important;
        right: 130px !important; /* 110px→130pxに変更 */
        margin: 0 !important;
        z-index: 500 !important;
        width: auto !important;
    }
    
    #header-search, .header-search, .widget_search {
        position: absolute !important;
        top: 25px !important;
        right: 180px !important; /* 160px→180pxに変更 */
        margin: 0 !important;
        z-index: 500 !important;
        width: auto !important;
    }


    /* -------------------------------------------------
       ボタン類（変更なし・正常動作中）
    ------------------------------------------------- */
    #site-navigation input[type="checkbox"],
    input.menu-checkbox,
    .menu-toggle-check {
        display: none !important;
    }

    #site-navigation-toggle,
    button.menu-toggle,
    .menu-toggle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important; 
        top: 20px !important;
        right: 10px !important;
        left: auto !important;
        width: 44px !important;
        height: 44px !important;
        background: transparent !important;
        border: 1px solid rgba(0,0,0,0.1) !important;
        border-radius: 4px !important;
        padding: 0 !important;
        z-index: 10000 !important;
        font-size: 0 !important;
        cursor: pointer !important;
        pointer-events: auto !important;
    }

    #site-navigation-toggle::before,
    button.menu-toggle::before,
    .menu-toggle::before {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        left: 11px !important;
        top: 12px !important;
        width: 20px !important;
        height: 2px !important;
        background-color: #333333 !important;
        box-shadow: 
            0 7px 0 #333333,
            0 14px 0 #333333 !important;
    }

    /* -------------------------------------------------
       【修正2】スマホメニューの色変更（白背景・黒文字）
    ------------------------------------------------- */
    
    /* コンテナを表示 */
    html body header#masthead nav,
    html body #site-navigation {
        display: block !important;
        position: static !important;
        background: transparent !important;
        height: auto !important;
        min-height: 0 !important;
    }
    
    /* 初期非表示 */
    .header-nav-container,
    .menu-main-container,
    #site-navigation ul,
    .nav-menu {
        display: none; 
    }

    /* 開いた時のコンテナ（白背景） */
    .toggled .header-nav-container,
    .toggled .menu-main-container,
    #site-navigation.toggled div,
    #site-navigation.toggled ul {
        display: block !important;
        background-color: #FFFFFF !important; /* ここを白に！ */
        position: absolute;
        top: 80px !important;
        left: 0;
        width: 100%;
        z-index: 9999;
        border-top: 1px solid #eee !important;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1) !important;
    }

    /* メニュー項目（白背景） */
    .toggled .header-nav-container ul li,
    #site-navigation.toggled ul li {
        display: block !important;
        width: 100% !important;
        border-bottom: 1px solid #eeeeee !important;
        background-color: #FFFFFF !important; /* ここも白に！ */
        text-align: left !important;
        margin: 0 !important;
    }

    /* リンク文字（黒色） */
    .toggled .header-nav-container ul li a,
    #site-navigation.toggled ul li a {
        color: #333333 !important; /* ここを黒に！ */
        display: block !important;
        padding: 15px 20px !important;
        text-decoration: none !important;
        background-color: transparent !important; /* ホバーのピンク等を消す */
    }
    
    /* タップ時の色（薄いグレー） */
    .toggled .header-nav-container ul li a:active,
    .toggled .header-nav-container ul li a:hover,
    #site-navigation.toggled ul li a:hover {
        background-color: #f5f5f5 !important;
        color: #333333 !important;
    }
}