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

/* 全体的なコンテナ - 変更なし */
#shippingInfoPage {
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    line-height: 1.6;
    color: #333;
}

/* 目次/ナビゲーション */
#shippingNav {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px 20px;
    margin-bottom: 30px;
    /* text-align: center; を削除し、デフォルトの左寄せに戻す */

    /* ★ここから変更：shippingNav自体の幅を調整し、左寄せにする★ */
    width: 60%; /* ★目次ボックスの幅を60%に縮小（調整可能）★ */
    max-width: 400px; /* ★目次ボックスの最大幅を設定（調整可能）★ */
    margin-left: 0; /* ★左寄せにするために左マージンを0に設定★ */
    margin-right: auto; /* ★右マージンをautoに設定して左寄せを補完★ */
}

#shippingNav ul {
    list-style: disc inside;
    padding-left: 20px;
    margin: 0;
}

#shippingNav li {
    margin-bottom: 5px;
}

#shippingNav li:last-child {
    margin-bottom: 0;
}

#shippingNav a {
    display: inline;
    padding: 0;
    background-color: transparent;
    color: #007bff;
    text-decoration: underline;
    border-radius: 0;
    font-size: 1em;
    font-weight: normal;
    transition: none;
    white-space: normal;
}

#shippingNav a:hover,
#shippingNav a:focus {
    color: #0056b3;
    text-decoration: none;
    background-color: transparent;
}


/* 各コンテンツセクション - 変更なし */
.contentItem {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #eee;
}

.contentItem:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.contentItem h2 {
    font-size: 1.8em;
    color: #0056b3;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-align: left;
    position: relative;
}

/* H2見出しのアンカーリンクスタイルを調整 - 変更なし */
.contentItem h2 a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.contentItem h2 a:hover {
    text-decoration: none;
}

.contentItem h3 {
    font-size: 1.4em;
    color: #495057;
    margin-top: 25px;
    margin-bottom: 15px;
    border-left: 5px solid #6c757d;
    padding-left: 10px;
}

/* 水平線 - 変更なし */
hr.splitline01 {
    border: 0;
    height: 1px;
    background-color: #ccc;
    margin: 20px 0;
}

/* 箇条書きリスト - 変更なし */
.contentItem ul {
    list-style: disc inside;
    margin-left: 20px;
    padding-left: 0;
}

.contentItem ul li {
    margin-bottom: 8px;
    padding-left: 5px;
}

/* テーブル - 変更なし */
table.shipoffpricelist {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    margin-bottom: 20px;
}

table.shipoffpricelist th,
table.shipoffpricelist td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
}

table.shipoffpricelist thead th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #555;
    text-align: center;
}

table.shipoffpricelist tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

table.shipoffpricelist ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

table.shipoffpricelist ul li {
    margin-bottom: 5px;
    padding-left: 0;
}

/* 強調表示 - 変更なし */
.priceExp {
    color: #dc3545;
    font-weight: bold;
    font-size: 1.1em;
}

.strong01 {
    color: #ffc107;
    font-weight: bold;
}

/* 画像の調整 - 変更なし */
.contentItem img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
}

/* スマートフォンでの表示調整 (例) */
@media (max-width: 768px) {
    /* shippingInfoPageは変更なしだが、親要素の調整によっては必要になるかも */
    /* #shippingInfoPage {
        padding: 15px;
    } */

    /* 目次/ナビゲーション - スマートフォンでの調整 */
    #shippingNav {
        width: 90%; /* ★スマホでは目次ボックスの幅を90%に（調整可能）★ */
        margin-left: auto; /* ★スマホでは中央寄せに戻す★ */
        margin-right: auto; /* ★スマホでは中央寄せに戻す★ */
        padding: 10px 15px;
        margin-bottom: 20px;
    }

    #shippingNav ul {
        padding-left: 15px;
    }

    /* テーブルのレスポンシブ表示は維持 - 変更なし */
    table.shipoffpricelist,
    table.shipoffpricelist thead,
    table.shipoffpricelist tbody,
    table.shipoffpricelist th,
    table.shipoffpricelist td,
    table.shipoffpricelist tr {
        display: block;
    }

    table.shipoffpricelist thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    table.shipoffpricelist tr {
        border: 1px solid #ddd;
        margin-bottom: 15px;
        border-radius: 5px;
    }

    table.shipoffpricelist td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }

    table.shipoffpricelist td:before {
        content: attr(data-label);
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }
    table.shipoffpricelist tbody tr td:first-child:before { content: "発送地域:"; }
    table.shipoffpricelist tbody tr td:nth-child(2):before { content: "料金:"; }
}