/*
Theme Name: Welcart Basic Child
Template: welcart_basic
Theme URI: https://www.welcart.com/
Description: Welcart Basic 用の子テーマ
Author: オレンジホールディング株式会社
Version: 1.0.0
*/

.swiper {
    width: 100%;
    height: auto;
    margin-bottom: 40px; /* スライダーと下部コンテンツの間に余白を追加 */
}

.swiper-slide picture,
.swiper-slide img {
    display: block; /* picture要素とimg要素の余白をなくす */
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* カスタムロゴのスタイル調整 */
.custom-logo-link img {
    max-width: 100%;
    height: auto;
}

/* ドロップダウンメニューをお洒落にするスタイル（優先度強化） */
body #masthead .main-navigation ul.sub-menu {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15) !important;
    border: none !important;
    border-radius: 0 0 5px 5px !important;
    padding: 10px 0 !important;
}
body #masthead .main-navigation ul.sub-menu li a {
    padding: 12px 20px !important;
    transition: background-color 0.2s ease, opacity 0.2s ease !important;
}
/* ドロップダウン内のリンクホバー時に少しハイライト */
body #masthead .main-navigation ul.sub-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

/* =========================================
   ロゴ画像のレスポンシブサイズ調整（幅はカスタマイザーから出力）
   ========================================= */
.custom-logo-link img {
    max-width: 100%;
    height: auto;
}

/* =========================================
   見出し (H2, H3, H4) の基本スタイル（色はカスタマイザーから出力）
   ========================================= */
/* 記事本文や固定ページなどのメインエリア内の見出しに適用 */
#main .entry-content h2,
#main #content h2.entry-title {
    font-size: 1.5em;
    padding: 0.8em;
    border-left: 5px solid;
    margin-bottom: 1em;
    letter-spacing: 0.05em; /* 文字の重なりを解消するための文字間隔 */
    line-height: 1.5; /* 行高を整える */
    box-sizing: border-box; /* パディングによるレイアウト崩れを防止 */
}

#main .entry-content h3 {
    font-size: 1.3em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid;
    margin-bottom: 1em;
}

#main .entry-content h4 {
    font-size: 1.1em;
    padding-left: 0.5em;
    border-left: 3px solid #666666; /* H4のアクセント色は固定 */
    margin-bottom: 1em;
}

/* =========================================
   Welcart 商品詳細ページ：オプション入力欄の最適化
   ========================================= */
.item_option {
    width: 100%;
    margin-bottom: 25px;
    border-collapse: collapse;
}
.item_option th {
    background-color: #f7f7f7;
    padding: 15px 12px;
    border: 1px solid #e5e5e5;
    text-align: left;
    width: 35%;
    font-weight: bold;
    font-size: 0.9em;
    vertical-align: middle;
}
.item_option td {
    padding: 12px;
    border: 1px solid #e5e5e5;
    vertical-align: middle;
}
.item_option input[type="text"],
.item_option textarea,
.item_option select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    background-color: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
/* 入力中のフォーカス状態を強調 */
.item_option input[type="text"]:focus,
.item_option textarea:focus,
.item_option select:focus {
    border-color: #0066cc;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 102, 204, 0.2);
}
/* スマホ表示時の調整（縦積みにする） */
@media screen and (max-width: 767px) {
    .item_option th, 
    .item_option td {
        display: block;
        width: 100%;
    }
    .item_option th {
        border-bottom: none;
    }
}
/* =========================================
   Welcart 商品画像（詳細・ウィジェット）：サイズ統一とカット防止
   ========================================= */
/* スライダー（use_swiper: yes）時の画像枠 */
.item-swiper .swiper-slide {
    aspect-ratio: 1 / 1;
    background-color: #f7f7f7;
    position: relative;
    overflow: hidden;
}
.item-swiper .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
}
.item-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    position: absolute;
    top: 0;
    left: 0;
}

/* 詳細ページ＆ウィジェット：通常画像の枠 */
#img-box .itemimg,
.widget_welcart_itemreco .itemimg,
.widget_welcart_bestseller .itemimg {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f7f7f7;
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
}
#img-box .itemimg a,
.widget_welcart_itemreco .itemimg a,
.widget_welcart_bestseller .itemimg a {
    display: block;
    width: 100%;
    height: 100%;
}
#img-box .itemimg img,
.widget_welcart_itemreco .itemimg img,
.widget_welcart_bestseller .itemimg img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    position: absolute;
    top: 0;
    left: 0;
}

/* 詳細ページ：サブ画像枠（サムネイルを綺麗に並べる） */
#img-box .itemsubimg {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
#img-box .itemsubimg a {
    display: block;
    width: calc(33.333% - 7px);
    aspect-ratio: 1 / 1;
    background-color: #f7f7f7;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}
#img-box .itemsubimg img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    position: absolute;
    top: 0;
    left: 0;
}
/* =========================================
   Welcart 商品詳細ページ：価格・在庫まわりの最適化
   ========================================= */
.item-price-block {
    background-color: #fcfcfc;
    padding: 20px;
    border: 1px solid #eeeeee;
    border-radius: 5px;
    margin-bottom: 25px;
}
.item-price-block .zaikostatus {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333333;
}
.item-price-block .zaikostatus-value {
    color: #0066cc; /* 在庫あり等の色 */
}
.item-price-block .field_price {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.item-price-block .field_cprice {
    font-size: 1em;
    color: #888888;
}
.item-price-block .cprice-value {
    text-decoration: line-through; /* 定価に取り消し線 */
    margin-left: 5px;
}
.item-price-block .field_sellprice {
    font-size: 2em;
    font-weight: bold;
    color: #cc0000; /* 販売価格を赤く大きく */
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.item-price-block .tax-guid {
    font-size: 0.45em;
    font-weight: normal;
    color: #666666;
}
.item-price-block .field_taxincluded {
    font-size: 0.9em;
    color: #666666;
    margin-top: 5px;
    text-align: right;
}
/* =========================================
   ヘッダー：サイト説明文（キャッチフレーズ）の幅調整
   ========================================= */
#masthead .site-description {
    width: 100% !important;
    display: block !important;
    float: none !important;
    clear: both !important;
    margin-bottom: 10px; /* 下のロゴとの間に少し余白を持たせる */
    text-align: left; /* 中央揃えにしたい場合は center に変更してください */
}
/* =========================================
   トップページ：最新の投稿（お知らせ）リストのスタイル
   ========================================= */
.news-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.news-list .news-item {
    width: calc(25% - 15px); /* PCでは4列に並べる */
    box-sizing: border-box;
}
.news-thumbnail {
    margin-bottom: 10px;
}
.news-thumbnail a {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3; /* 画像を4:3の横長比率で統一 */
    background-color: #f7f7f7;
    overflow: hidden;
    border-radius: 4px;
}
.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 枠を綺麗に埋めるようにカット */
    transition: transform 0.3s ease;
}
.news-thumbnail a:hover img {
    transform: scale(1.05); /* カーソルを乗せた時に少し拡大 */
}
.news-thumbnail .no-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    color: #999999;
    font-size: 0.9em;
    background-color: #eeeeee;
}
.news-date {
    font-size: 0.85em;
    color: #888888;
    margin-bottom: 5px;
}
.news-list .news-title {
    font-size: 1.05em !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    border: none !important;
    padding: 0 !important;
    background: none !important;
}
.news-list .news-title a {
    color: #333333;
    text-decoration: none;
}
.news-list .news-title a:hover {
    color: #0066cc;
}

/* スマホ・タブレット表示時のレスポンシブ調整 */
@media screen and (max-width: 991px) {
    .news-list .news-item {
        width: calc(50% - 10px); /* タブレットでは2列 */
    }
}
@media screen and (max-width: 767px) {
    .news-list {
        gap: 15px;
    }
    .news-list .news-item {
        width: 100%; /* スマホでは1列 */
    }
}