/*
 * Zen Cart Shipping Information Page Styling
 * For define_shippinginfo.php
 */


/*2025-07-04 Modified by T.Honda (Previous/Next Navigation) */
.navNextPrevWrapper {
    display: flex;
    justify-content: space-around; /* 要素を均等に配置 */
    align-items: center; /* 垂直方向中央揃え */
    padding: 15px 0;
    margin-top: 20px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.navNextPrevCounter {
    flex-grow: 1; /* カウンターを中央に配置するために伸びる */
    text-align: center;
    font-size: 0.9em;
    color: #666;
    padding: 0 10px; /* テキストとボタンの間に余白 */
}

.navNextPrevList {
    flex-shrink: 0; /* ボタンが縮まないようにする */
    padding: 0 10px;
}

.navNextPrevList a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s ease;
}

.navNextPrevList a:hover {
    color: #007bff; /* ホバー時の色 */
}

.navNextPrevList .fa-solid {
    font-size: 1.8em; /* アイコンサイズを大きく */
    margin: 0 5px; /* アイコンとテキストの間のスペース */
    color: #007bff; /* アイコンの色 */
}

.navNextPrevList img { /* 画像ボタンのスタイル調整 */
    vertical-align: middle;
    border: none;
    padding: 5px 10px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.navNextPrevList img:hover {
    background-color: #e2e6ea;
    border-color: #c6c6c6;
}

/* モバイル表示時の調整 */
@media (max-width: 768px) {
    .navNextPrevCounter {
        order: 2; /* カウンターを中央に */
    }
    .navNextPrevList:first-child {
        order: 1; /* 前へボタンを左に */
    }
    .navNextPrevList:last-child {
        order: 3; /* 次へボタンを右に */
    }
    .navNextPrevList a {
        font-size: 0; /* テキストを非表示にし、アイコンのみにする */
    }
    .navNextPrevList img {
        width: 40px; /* 画像ボタンのサイズを調整 */
        height: auto;
        padding: 5px;
    }
}

/*ショッピングカート用デザイン*/
#shoppingCartDefault {
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

#cartDefaultHeading {
    font-size: 2.2em;
    color: #333;
    margin-bottom: 25px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.forward, .buttonRow {
    text-align: right; /* ボタンやメッセージを右揃えに */
    margin-bottom: 15px;
}

.buttonRow.back {
    text-align: left; /* 戻るボタンなどを左揃えに */
}

.cartInstructionsDisplay {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.cartTotalsDisplay {
    font-size: 1.3em;
    font-weight: bold;
    text-align: right;
    margin: 20px 0;
    padding: 10px 20px;
    background-color: #e9f5ff; /* 明るい青の背景 */
    border-radius: 5px;
    border: 1px solid #cceeff;
}

.messageStackError {
    background-color: #ffe0e0;
    color: #d80000;
    border: 1px solid #d80000;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-weight: bold;
}

#cartContentsDisplay {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

#cartContentsDisplay th,
#cartContentsDisplay td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top; /* 上揃え */
}

#cartContentsDisplay th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #555;
    text-transform: uppercase;
    font-size: 0.9em;
}

#cartContentsDisplay tr:last-child td {
    border-bottom: none;
}

.cartQuantity, .cartUnitDisplay, .cartTotalDisplay, .cartRemoveItemDisplay {
    white-space: nowrap; /* 内容が改行されないように */
}

.cartProductDisplay {
    display: flex;
    align-items: flex-start; /* 画像とテキストが上揃えになるように */
    gap: 15px; /* 画像とテキストの間のスペース */
}

.cartImage {
    flex-shrink: 0;
    width: 80px; /* 画像の幅を固定 */
    height: auto;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 4px;
}

.cartProdTitle {
    font-weight: bold;
    color: #007bff; /* 商品名のリンク色 */
    text-decoration: none;
    font-size: 1.1em;
    display: block;
    margin-bottom: 5px;
}

.cartProdTitle .alert.bold {
    display: block; /* 在庫アラートを独立した行に */
    font-size: 0.8em;
    color: #dc3545;
    margin-top: 5px;
}

.cartAttribsList {
    font-size: 0.9em;
    color: #666;
    margin-top: 8px;
    padding-left: 0;
    list-style: none; /* リストの点を削除 */
}
.cartAttribsList li {
    margin-bottom: 3px;
}

.cartRemoveItemDisplay img {
    width: 24px; /* ゴミ箱アイコンのサイズ */
    height: 24px;
    vertical-align: middle;
}

#cartSubTotal {
    text-align: right;
    font-size: 1.4em;
    font-weight: bold;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

/* モバイル対応 */
@media (max-width: 768px) {
    #cartContentsDisplay th,
    #cartContentsDisplay td {
        display: block; /* セルをブロック要素にして縦に積む */
        width: 100%;
        text-align: left;
        box-sizing: border-box;
    }

    #cartContentsDisplay th {
        display: none; /* ヘッダーを非表示 */
    }

    #cartContentsDisplay td {
        border-bottom: none; /* モバイルではセルの下線を削除 */
        padding: 8px 15px;
    }

    #cartContentsDisplay tr {
        border: 1px solid #eee; /* 行ごとに区切り線 */
        margin-bottom: 15px;
        display: block;
        border-radius: 5px;
        overflow: hidden; /* 角丸を適用 */
    }

    .cartProductDisplay {
        flex-direction: column; /* 画像とテキストを縦並びにする */
        align-items: center;
        text-align: center;
    }

    .cartImage {
        width: 100px; /* モバイルでの画像サイズ */
        height: auto;
        margin-bottom: 10px;
    }

    .cartProdTitle {
        font-size: 1.2em;
        margin-bottom: 0;
    }

    .cartProdTitle .alert.bold {
        margin-top: 0;
    }

    .cartAttribsList {
        text-align: left;
        padding-left: 20px; /* インデントを戻す */
    }

    .cartQuantity,
    .cartQuantityUpdate,
    .cartUnitDisplay,
    .cartTotalDisplay,
    .cartRemoveItemDisplay {
        text-align: center; /* モバイルでは中央揃え */
        white-space: normal;
    }

    /* 隠しテキストの表示 */
    .cartUnitDisplay b.hide,
    .cartTotalDisplay b.hide {
        display: inline-block; /* TABLE_HEADING_PRICE/TOTAL のテキストを表示 */
        width: auto;
        margin-right: 5px;
        color: #555;
        font-weight: normal;
        font-size: 0.9em;
    }
}

/*2025-07-04 Modified by T.Honda 商品詳細*/
#productDetailsList {
    list-style: none; /* リストの点を削除 */
    padding: 0;
    margin: 0 0 20px 0;
    font-size: 0.95em;
    line-height: 1.8; /* 行間を広げて読みやすく */
}

#productDetailsList li {
    border-bottom: 1px dotted #eee; /* 各項目に点線の下線 */
    padding: 5px 0;
    color: #555;
}

#productDetailsList li:last-child {
    border-bottom: none; /* 最後の下線を削除 */
}

/*2025-07-04 Modified by T.Honda 新着商品*/
#newProductsDefaultHeading {
    font-size: 2.2em;
    color: #333;
    margin-bottom: 25px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

#filter-wrapper {
    display: flex;
    justify-content: flex-end; /* ソートオプションを右寄せ */
    align-items: center;
    margin-bottom: 25px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

#filter-wrapper select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 1em;
    appearance: none; /* デフォルトの矢印を非表示にする（カスタムスタイル用） */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007bff%22%20d%3D%22M287%2C197.398L154.004%2C64.399c-3.613-3.613-10.016-3.613-13.629%2C0L5.398%2C197.398c-3.613%2C3.613-3.613%2C10.016%2C0%2C13.629c3.613%2C3.613%2C10.016%2C3.613%2C13.629%2C0L147.19%2C87.051l128.583%2C128.583c3.613%2C3.613%2C10.016%2C3.613%2C13.629%2C0C290.611%2C207.414%2C290.611%2C201.011%2C287%2C197.398z%22%2F%3E%3C%2Fsvg%3E'); /* カスタム矢印アイコン */
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    padding-right: 30px; /* 矢印アイコンのための右パディング */
}

/* 商品リストのスタイル (tpl_modules_product_listing.php によって出力されるもの) */
/* この部分のスタイルは、tpl_modules_product_listing.php の内容によって大きく変わるため、具体的なHTML構造を元に調整が必要です */
.productsListingTable { /* もしテーブルの場合 */
    width: 100%;
    border-collapse: collapse;
}
.productsListingTable td {
    padding: 15px;
    border-bottom: 1px dashed #eee;
    vertical-align: top;
}
/* ... 商品画像のスタイル、商品名のスタイルなど ... */

/*2025-07-04 Modified by T.Honda 商品のスタイル*/
#productGeneral {
    padding: 30px; /* 全体的なパディングを増やす */
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* 影を強調 */
}

/* 商品名 (今回は #pinfo-left の外に出す想定でスタイル調整) */

/* 商品名 (h1#productName) のスタイルを調整 */
#productName {
    font-size: 2.8em;
    color: #333;
    margin-bottom: 0; /* holyzon とのマージンを holyzon が持つため0に */
    text-align: left; /* 商品名は左寄せに戻す */
    line-height: 1.2;
    padding-bottom: 10px; /* 下線とのパディング */
    /* border-bottom: 2px solid #f0f0f0;  商品名直下の線はholyzonが担う */
}

/* horizontal-line のスタイル */
#horizontal-line {
    width: 100%;
}

/* main-content-wrapper (旧 #prod-info-top) - 画像と右側情報を囲むコンテナ */
#prod-info-top { /* このIDにFlexboxを適用 */
    display: flex;
    flex-wrap: wrap; /* 小さい画面で折り返す */
    gap: 40px; /* 列間の間隔 */
    margin-bottom: 0; /* その後の #horizontal-line とのマージンは線が持つ */
    justify-content:space-between;
    align-items: flex-start; /* 上揃え */
    /* padding: 20px 0;  必要に応じて追加 */
}

/* 左カラム (画像 - #pinfo-left) */
#pinfo-left {
    flex: 2 1 55%; /* 画像エリアを広くする */
    min-width: 350px; /* モバイルでの最小幅 */
    text-align: center;
    box-sizing: border-box; /* パディングを含めて幅を計算 */
}

/* 右カラム (価格、在庫、詳細リスト、カートボックス、ボタン類 - #pinfo-right) */
#pinfo-right {
    flex: 1 1 35%; /* 右側の情報エリア */
    min-width: 300px; /* モバイルでの最小幅 */
    display: flex;
    flex-direction: column; /* 要素を縦に並べる */
    box-sizing: border-box; /* パディングを含めて幅を計算 */
    padding-bottom: 25px;
}

/* #pinfo-right 内の情報をグループ化して右寄せ */
/* 元のHTMLで #pinfo-right に直接入っている group.grids クラスに適用 */
#pinfo-right .group.grids {
    /* Zen CartのデフォルトのHTMLで、#pinfo-right の直下にコンテンツが来る場合、
       Flexboxアイテムとして自動的に配置されるため、明示的な flex-grow は不要です。
       `margin-left: auto;` を適用したい場合、Flexboxコンテナ内に直接配置されている
       場合に有効ですが、#pinfo-right 自体が Flexboxアイテムなので、
       #pinfo-right の幅が固定されているか、または親コンテナで justify-content: flex-end;
       を適用する方が適切です。
       ここでは #pinfo-right 内の各要素を右寄せにするスタイルを適用します。
    */
}
/* 価格と購入関連のボックス (旧 #cart-box の中身を流用し、#pinfo-right の中に配置) */
#cart-box {
    background-color: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px; /* 下部の要素とのマージン */
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-left: auto; /* 右寄せ */
    margin-top: 25px;
    width: auto; /* 親要素に合わせる */
    max-width: 400px; /* 最大幅を設定してPCで広がりすぎないように */
}


/* 価格表示 */
#productPrices {
    font-size: 2.8em; /* 価格をさらに大きく強調 */
    color: #e44d26; /* 印象的なオレンジ色 */
    font-weight: bold;
    margin-bottom: 15px; /* 在庫との間隔 */
    text-align: right; /* 右寄せに */
    line-height: 1.1;
    border-bottom: none; /* 元のCSSから不要な下線を削除 */
    padding-bottom: 0;
}

/* 在庫ステータス - 新しいスタイル */
#productStockStatus { /* Zen CartのデフォルトHTMLには存在しないため、tpl_product_info_display.phpに追記が必要 */
    font-size: 1.2em; /* 在庫表示を大きく */
    font-weight: bold;
    margin-bottom: 25px; /* カートボタンとの間隔 */
    text-align: right; /* 右寄せに */
    padding: 5px 0;
    color: #333; /* デフォルトの文字色 */
}
#productStockStatus .inStock {
    color: #28a745; /* 在庫ありは緑 */
    background-color: #e6ffe6; /* 薄い緑の背景 */
    padding: 8px 12px;
    border-radius: 5px;
    display: inline-block; /* テキストの長さに合わせる */
}
#productStockStatus .outOfStock {
    color: #dc3545; /* 在庫なしは赤 */
    background-color: #ffe6e6; /* 薄い赤の背景 */
    padding: 8px 12px;
    border-radius: 5px;
    display: inline-block;
}


/* Add to Cartボタンのスタイル */
#cartAdd {
    background-color: transparent; /* 親要素の背景を使う */
    border: none; /* 親要素の枠を使う */
    padding: 0;
    margin-top: 25px; /* 上部の余白 */
    display: flex;
    flex-direction: column; /* 縦積み */
    gap: 15px; /* 要素間の間隔 */
    align-items: center; /* 中央揃え */
}

/* 数量入力とテキスト */
#cartAdd .qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px; /* ボタンとの間隔 */
    width: 100%; /* 親要素の幅を使う */
    justify-content: center; /* 中央寄せ */
}

#cartAdd .qty-text {
    font-weight: bold;
    color: #555;
    font-size: 1.1em;
    white-space: nowrap;
}

#cartAdd input[type="text"], #cartAdd input[type="number"] { /* input[type="number"]も含む */
    width: 80px; /* 幅を少し広げる */
    padding: 12px 15px; /* パディングを増やして大きく見せる */
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.4em; /* フォントサイズを大きく */
    text-align: center;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
    -moz-appearance: textfield; /* Firefox のスピナーを非表示 */
}
/* Chrome, Safari, Edge, Opera のスピナーを非表示 */
#cartAdd input[type=number]::-webkit-inner-spin-button,
#cartAdd input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


/* カート追加ボタン */
#addToCartButton {
    width: 100%; /* 幅を親要素に合わせる */
    max-width: 300px; /* 最大幅を設定 */
    padding: 15px 30px;
    background-color: #e44d26; /* 価格と同じオレンジ色のボタン */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.5em; /* ボタンの文字を大きく */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-transform: uppercase;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(228, 77, 38, 0.3); /* 影を追加 */
}

#addToCartButton:hover {
    background-color: #c9411f;
    transform: translateY(-3px); /* 少し持ち上がるエフェクト */
}


/*bof Product details list (Model, Weight etc.) */
#productDetailsList {
    list-style: none; /* リストの点を削除 */
    padding: 0;
    margin: 20px;
    font-size: 1.0em;
    line-height: 1.8; /* 行間を広げて読みやすく */
}

li.pquantity{
    font-size: 2.0em;
}

#productDetailsList li {
    border-bottom: 1px dotted #eee; /* 各項目に点線の下線 */
    padding: 5px 0;
    color: #555;
}

#productDetailsList li:last-child {
    border-bottom: none; /* 最後の下線を削除 */
}
/*eof Product details list */


/* Ask a Question と Free Shipping Icon のまとまり */
.productActionButtons {
    display: flex;
    justify-content: flex-end; /* 右寄せ */
    align-items: center;
    margin-top: 20px;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px dashed #f0f0f0;
}

#productQuestions a, #freeShippingIcon {
    display: inline-block;
    vertical-align: middle;
}
#askAQuestionButton {
    padding: 10px 20px;
    background-color: #6c757d; /* グレーのボタン */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
}
#askAQuestionButton:hover {
    background-color: #5a6268;
}

/* 商品説明 */
#productDescription {
    line-height: 1.8;
    color: #333;
    margin-top: 40px;
    padding-top: 30px;
    padding-left:30px;
    border-top: 2px solid #f0f0f0;
    font-size: 1.2em;
}

/* レビュー、日付、URLなど */
#productReviewLink, #productDateAvailable, #productDateAdded, #productInfoLink {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95em;
    color: #666;
}
#productReviewLink a {
    text-decoration: none;
    display: inline-block;
}
#productReviewLink img {
    padding: 10px 20px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s ease;
}
#productReviewLink img:hover {
    background-color: #e0e0e0;
}
.reviewCount {
    margin-top: 10px;
    font-weight: bold;
}

/* --- モバイルレスポンシブ --- */
@media (max-width: 768px) {
    #productGeneral {
        padding: 15px;
    }
    
    /* 商品名 */
    #productName {
        font-size: 2em;
        text-align: center; /* モバイルでは中央寄せに */
        margin-bottom: 15px;
        border-bottom: none; /* モバイルでは下線を非表示 */
        padding-bottom: 0;
    }

    /* メインのFlexboxレイアウトを縦積み */
    #prod-info-top {
        flex-direction: column; /* 縦積み */
        gap: 20px;
        margin-top: 15px;
    }
    
    /* 各カラムを全幅に */
    #pinfo-left, #pinfo-right {
        flex: 1 1 100%; /* 全幅 */
        min-width: unset;
        padding: 0; /* 余分なパディングを削除 */
    }

    /* 右側の情報カラム内のグループ（#cart-boxなど）も中央寄せ */
    #pinfo-right > .group.grids {
        margin-left: auto;
        margin-right: auto;
        width: 100%; /* 親要素の幅に合わせる */
        max-width: 400px; /* PCでの最大幅を維持 */
    }

    /* 価格と購入関連のボックス */
    #cart-box {
        padding: 15px;
        margin-bottom: 20px;
        margin-left: auto;
        margin-right: auto; /* 中央寄せ */
    }

    /* 価格表示 */
    #productPrices {
        font-size: 2.2em;
        text-align: center;
    }
    /* 在庫ステータス */
    #productStockStatus {
        font-size: 1.2em;
        text-align: center;
        margin-bottom: 15px;
    }
    
    /* 商品詳細リスト */
    #productDetailsList {
        margin-bottom: 20px;
    }

    /* カート追加ボックス */
    #cartAdd {
        flex-direction: column; /* カート要素を縦積み */
        gap: 10px;
        padding: 15px 0 0 0;
        margin-top: 20px;
    }
    #cartAdd input[type="text"], #cartAdd input[type="number"] {
        width: 100px;
        font-size: 1.2em;
    }
    #addToCartButton {
        width: 100%; /* ボタンを全幅に */
        font-size: 1.2em;
        padding: 12px 20px;
    }
    /* Ask a Question ボタンなど */
    .productActionButtons {
        justify-content: center; /* モバイルでは中央寄せ */
        gap: 10px;
        margin-top: 15px;
        padding-top: 10px;
    }
    #askAQuestionButton {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    /* 商品説明 */
    #productDescription {
        margin-top: 30px;
        padding-top: 20px;
        font-size: 1em;
    }
}