
/* ========================================
   商品一覧：ホバー時に商品名を表示
   ======================================== */

.products .product {
    position: relative !important;
}

/* 商品画像を正方形にする */
.products .product .ct-media-container {
    display: block !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden;
}

.products .product .ct-media-container img,
.products .product img.attachment-woocommerce_thumbnail {
    display: block !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    object-fit: contain !important;
}

/* 商品名を画像の上に重ねる */
.products .product .woocommerce-loop-product__title {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 16px !important;
    text-align: center !important;
    background: rgba(255, 255, 255, .82) !important;
    color: #111 !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 5 !important;
}

/* マウスを乗せたとき、またはキーボード操作時に表示 */
.products .product:hover .woocommerce-loop-product__title,
.products .product:focus-within .woocommerce-loop-product__title {
    opacity: 1;
    visibility: visible;
}

/* タッチ端末では商品名を常時表示 */
@media (hover: none) {
    .products .product .woocommerce-loop-product__title {
        opacity: 1;
        visibility: visible;
    }
}

/* 画像と価格の間隔を縮める */
.products .product figure {
    margin-bottom: 2px !important;
    padding-bottom: 0 !important;
}

.products .product .price {
    display: block !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}


/* ========================================
   浮動 LOAD MORE ボタン
   ======================================== */

/* JSが表示対象にしたとき、画面下部に固定 */
.ct-load-more-helper.doodad-load-more-visible {
    display: flex !important;
    position: fixed !important;
    left: 50% !important;
    bottom: 28px !important;
    transform: translate(-50%, 0) !important;
    z-index: 9990 !important;
    width: auto !important;
    max-width: calc(100vw - 32px) !important;
    margin: 0 !important;
}

/* 最終ページでは表示しない */
.ct-load-more-helper.doodad-no-more-products {
    display: none !important;
}

/* スマートフォン */
@media (max-width: 767px) {
    .ct-load-more-helper.doodad-load-more-visible {
        bottom: 18px !important;
        max-width: calc(100vw - 24px) !important;
    }
}


/* ========================================
   DOOOODAAADDD LADDER
   はしご・キャラクター・TOPボタン
   ======================================== */

/* はしご全体 */
#doodad-ladder {
    position: fixed !important;
    top: 150px !important;
    right: 0 !important;
    bottom: 50px !important;
    width: 70px !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 9999 !important;
    pointer-events: none !important;
    overflow: visible !important;
}

/* はしご上部 */
#doodad-ladder .ladder-top {
    display: block !important;
    height: auto !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* はしご中央部分 */
#doodad-ladder .ladder-middle {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

#doodad-ladder .ladder-middle img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* はしご下部 */
#doodad-ladder .ladder-bottom {
    display: block !important;
    height: auto !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* はしごを移動するキャラクター */
#doodad-ladder .doodad-ladder-character {
    position: absolute !important;
    left: -10px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 10 !important;
    opacity: 1;
    transition: opacity 0.15s ease;
    pointer-events: none !important;
}

#doodad-ladder .doodad-ladder-character img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* TOPボタン：初期状態では非表示 */
#doodad-ladder .doodad-ladder-top-button {
    position: absolute !important;
    left: -20px !important;
    bottom: 0 !important;
    width: 100px !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 20 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ページ最下部で表示 */
#doodad-ladder .doodad-ladder-top-button.show {
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

#doodad-ladder .doodad-ladder-top-button img {
    display: block !important;
    width: 100px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* ========================================
   DOOODAAADDD: 商品一覧の2ページ目以降のHero
   1ページ目の高さ430pxに合わせる
   ======================================== */

body.woocommerce-page.paged.post-type-archive .hero-section {
    display: block !important;
    height: 430px !important;
    min-height: 430px !important;
    padding: 0 !important;
    box-sizing: border-box !important;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.72),
            rgba(255, 255, 255, 0.72)
        ),
        url("https://doooodaaaddd.com/wp-content/uploads/2026/09/BG-790x1024.png") !important;

    background-position: center 50% !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

body.woocommerce-page.paged.post-type-archive .hero-section .entry-header {
    display: flex !important;
    height: 430px !important;
    min-height: 430px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

/* 空のheader内にタイトルを表示 */
body.woocommerce-page.paged.post-type-archive .hero-section .entry-header::before {
    content: "ALL ITEM";
    display: block !important;
    color: #202a3a !important;
    font-size: clamp(32px, 5vw, 36px) !important;
    font-weight: 700 !important;
    text-align: center !important;
}
