/**
 * real-parts.css — 接客部ページビルダー「実物パーツ」共通CSS
 *
 * EasyPage実物(パーツ再現仕様.md)の各パーツはEasyPage内部では
 * `<style scoped class="nms-plugin-YYYYMMDDhhmmss">`のインスタンス毎スコープCSSだが、
 * このビルダーではキャンバス上に同種パーツが複数並ぶため、
 * 「構造CSSは共通クラスでここに1本化」「色・列数などパーツ固有の可変値はJSがインラインstyleで注入」
 * という方針にしている(パーツ再現仕様.md冒頭に明記の「色・列数などの見た目は各パーツのインラインstyle」
 * という実物の設計思想自体は踏襲)。
 *
 * クラス名は実物と1:1(list-group-item/global-title/readbeforebuy/GoodImg/font/
 * tbd-product-card系/category-level1〜5/link-listc等)。
 * 出典: 接客部/ページビルダー/_再現仕様/パーツ再現仕様.md
 */

/* ============================================================
   共通骨格(パーツ再現仕様.md「共通：ページ骨格とグローバルCSS」)
   ============================================================ */
body.nms.mqm-design { margin: 0; background: #fff; }
.nms .container, .demo { max-width: 980px; margin-left: auto !important; margin-right: auto !important; }

.global-bg-color { background-color: #337ab7 !important; color: #fff !important; }
.global-bg-color a { color: #fff !important; }
.global-color { color: #337ab7 !important; }
.global-border-color { border-color: #337ab7 !important; }
.global-title {
    background-color: #337ab7; color: #fff; margin-top: 10px; margin-bottom: -10px !important;
    border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; border-bottom-width: 0;
    display: block; padding: 10px 15px;
}
@media (max-width: 768px) { .global-title { margin-top: 0; } }

/* ============================================================
   text（readbeforebuy）
   ============================================================ */
.readbeforebuy { margin-top: 10px; padding: 10px; font-size: 13px; line-height: 1.8; }
.readbeforebuy p.text-center img { max-height: 40px; margin: 0 4px; }

/* ============================================================
   divider / spacer
   ============================================================ */
.tb-real-divider { border: none; margin: 10px 0; }
.tb-real-spacer { margin: 0; }

/* ============================================================
   banner_static / product_card 素マークアップ（GoodImgパターン）
   ============================================================ */
.tb-real-banner { margin-top: 10px; margin-bottom: 10px; display: flex; flex-wrap: wrap; }
.tb-real-banner .GoodImg { display: block; }
.tb-real-banner .GoodImg .img-responsive { width: 100%; }
.tb-real-banner .font {
    height: auto; overflow: hidden; margin: 0; display: -webkit-box; color: #000; font-size: 12px;
    -webkit-line-clamp: 5; -webkit-box-orient: vertical; word-break: break-all;
}
.tb-real-banner.tb-variant-col2 .font,
.tb-real-banner.tb-variant-col4 .font { text-align: center; }

/* ============================================================
   product_card（価格付き・tbd-*カスタム実装、0511e3cf実例）
   ============================================================ */
.tbd-flex-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 820px; margin: 10px auto; font-family: inherit; box-sizing: border-box; }
.tbd-product-card { width: calc(50% - 5px); display: flex; flex-direction: column; align-items: center; margin-bottom: 10px; padding: 12px 8px; text-align: center; box-sizing: border-box; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.tbd-product-card.tb-variant-col1 { width: 100%; }
.tbd-product-card.tb-variant-col3 { width: calc(33.333% - 7px); }
.tbd-product-card img { width: 100%; height: auto; aspect-ratio: 1 / 1; border: 0; display: block; object-fit: cover; }
.tbd-info-area { margin: 12px 0; line-height: 1.5; min-height: 54px; }
.tbd-price-normal { font-size: 11px; display: block; text-decoration: line-through; }
.tbd-text-extra { font-size: 12px; font-weight: bold; display: block; margin-top: 2px; }
.tbd-price-special { font-weight: bold; display: block; margin-top: 4px; }
.tbd-price-num { font-size: 32px; letter-spacing: -1px; }
.tbd-price-unit { font-size: 14px; }
.tbd-btn-custom { display: block; width: 100%; max-width: 150px; height: 35px; line-height: 35px; text-align: center; text-decoration: none; font-size: 13px; font-weight: bold; border-radius: 5px; margin: 5px auto 0; }
@media screen and (max-width: 400px) {
    .tbd-price-num { font-size: 22px; }
    .tbd-price-normal { font-size: 10px; }
    .tbd-text-extra { font-size: 11px; }
}

/* ============================================================
   side_nav（category-level1〜5、side.html実物）
   ============================================================ */
.tb-real-sidenav { margin-top: 10px; margin-bottom: 10px; padding-left: 0; }
.tb-real-sidenav li { list-style-type: none; }
.tb-real-sidenav a { word-wrap: break-word; word-break: normal; text-decoration: none; }
.tb-real-sidenav .list-group-item { margin-bottom: 0 !important; border-bottom-width: 0; border-top-width: 0; cursor: pointer; }
.tb-real-sidenav .list-group-item:last-child { border-bottom-width: 1px !important; }

.tb-real-sidenav .category-level1 { background-color: #337ab7; color: #fff; font-size: 12px; border: 1px solid #333; border-radius: 15px; }
.tb-real-sidenav .category-level1 a { font-size: 12px; color: #fff !important; }

.tb-real-sidenav .category-level2 { background-color: #eee; color: #000; font-size: 12px; border: 1px solid #333; border-radius: 15px; }
.tb-real-sidenav .category-level2 a { font-size: 12px; color: #000 !important; }

.tb-real-sidenav .category-level3 { background-color: #fff; color: #000; font-size: 11px; border: 1px solid #333; border-radius: 15px; }
.tb-real-sidenav .category-level4,
.tb-real-sidenav .category-level5 { background-color: #fff; color: #000; font-size: 11px; }

.tb-real-sidenav .category-level3,
.tb-real-sidenav .category-level4,
.tb-real-sidenav .category-level5 { display: none; }

.tb-real-sidenav i.fa-caret-right,
.tb-real-sidenav i.fa-chevron-down { font-size: 10px; }
.tb-real-sidenav i.hidden-caret { visibility: hidden; }

@media (min-width: 320px) and (max-width: 767px) {
    .tb-real-sidenav .category-level3,
    .tb-real-sidenav .category-level4,
    .tb-real-sidenav .category-level5 { display: none !important; }
}

/* ============================================================
   footer_nav（案内2カラム＋コピーライト、footer.html実物）
   ============================================================ */
.tb-real-footer-block { margin-bottom: 6px; }

/* ============================================================
   header_banner（ロゴ＋SPドロワー＋カート、header.html実物）
   ============================================================ */
.header_sp { width: auto; position: relative; }
.header_sp .tb-real-header-inner { position: relative; background: #fff; padding: 10px 0 15px 0; min-height: 60px; }
.header_sp .toggle_button { margin: 8px 0 0 8px; position: absolute; z-index: 1001; top: 15px; left: 0; display: block; width: 40px; height: 40px; cursor: pointer; }
.header_sp .toggle_button i { font-size: 32px; color: #c4ab80; }
.header_sp .toggle_button i.close { display: none; }
.header_sp .toggle_button.is-open i.open { display: none; }
.header_sp .toggle_button.is-open i.close { display: inline-block; }
.header_sp .drawer_bg { display: none; width: 100%; height: 100%; position: fixed; z-index: 999; top: 0; left: 0; background-color: rgba(51,51,51,0.8); }
.header_sp .drawer_content { display: none; z-index: 1000; position: fixed; top: 0; left: 0; width: 80% !important; max-width: 640px; height: 100vh; overflow: auto; transition: left .3s ease; }
.header_sp .drawer_content .drawer_inner { background-color: #fff; border-right: 2px solid #ccc; width: 100%; min-height: 100%; padding: 5% 5% 30px 5%; border-left: 5px solid #222; box-sizing: border-box; }
.header_sp h1 { text-align: center; margin: 0; }
.header_sp h1 img { width: 220px; max-width: 60%; }
.header_sp .cart_btn { position: absolute; top: 15px; right: 20px; }
.header_sp .cart_btn i { font-size: 32px; color: #c4ab80; }
@media screen and (max-width: 568px) {
    .header_sp .toggle_button i, .header_sp .cart_btn i { font-size: 25px; }
    .header_sp h1 img { width: 160px; }
}
.header_sp .drawer_content .drawer_inner .link-listc { list-style: none; margin: 0 auto; padding: 0; }
.header_sp .drawer_content .drawer_inner .link-listc > li { border-bottom: 1px solid #8a6d3b; float: left; margin: 0; width: 100%; }
.header_sp .drawer_content .drawer_inner .link-listc > li a { color: #8a6d3b; display: block; font-weight: bold; padding: 20px 14px 20px 5px; text-decoration: none; }
.header_sp .drawer_content .drawer_inner .link-listc > li a:hover { background-color: #8a6d3b; color: #fff; }

/* ============================================================
   banner_slider（Swiper標準構造・未実証だが土台のみ用意）
   ============================================================ */
.tb-real-slider .swiper-container { width: 100%; }
.tb-real-slider .swiper-slide { text-align: center; }
.tb-real-slider .swiper-slide img { width: 100%; height: auto; }

/* ============================================================
   FontAwesomeアイコンのUnicodeフォールバック
   easyP資料には all.min.css / v4-shims.min.css のみが存在し、参照先の
   webフォント実体(woff2/ttf等)が同梱されていない(取得元に存在しない)。
   CDN追加は環境ガードレール上禁止のため、実運用で使う5アイコンのみ
   システムフォントのUnicode記号で上書きし、文字化け/空欄を防ぐ。
   ============================================================ */
.header_sp .toggle_button i.open::before { content: "\2261"; font-family: inherit; font-weight: normal; }
.header_sp .toggle_button i.close::before { content: "\00d7"; font-family: inherit; font-weight: normal; }
.header_sp .cart_btn i::before { content: "\1f6d2"; font-family: inherit; font-weight: normal; }
.tb-real-sidenav i.fa-caret-right::before { content: "\25b8"; font-family: inherit; font-weight: normal; }
.tb-real-sidenav i.fa-chevron-down::before { content: "\25be"; font-family: inherit; font-weight: normal; }

/* ============================================================
   動的パーツ(第二弾・枠のみ)/未対応パーツ の表示
   ============================================================ */
.tb-placeholder-dynamic { background: #f4f4f4; border: 1px dashed #ccc; color: #999; text-align: center; padding: 24px 8px; font-size: 13px; margin: 10px 0; }
.tb-unknown { color: #c0392b; font-size: 12px; padding: 8px; }

/* ============================================================
   ビルダー用オーバーレイ補助（iframe内。ドラッグ中に選択できると誤操作になるため抑止）
   ============================================================ */
body.tb-canvas-dragging { user-select: none; }
[data-tb-row] { position: relative; }
[data-tb-col] { position: relative; min-height: 40px; }
[data-tb-part] { position: relative; }
