/* --- Root & Base Settings --- */
:root { --primary-color: #00408c; --category-green: #00814b; --text-dark: #333; --text-muted: #666; --bg-light: #f4f7f9; --border-color: #e0e6ed; --white: #ffffff; }
html { scroll-behavior: smooth; }
.exhibitor-detail { font-family: 'Noto Sans JP', sans-serif; color: var(--text-dark); line-height: 1.7; background: var(--white); overflow-x: auto; max-height: 100%; }
.detail-main { max-width: 1200px; margin: 0 auto; padding-top: 80px; width: 100%; box-sizing: border-box; }
.section-inner, .kv-inner, .spec-inner, .breadcrumb-inner, .nav-inner { width: 100%; padding: 0 20px 10px; box-sizing: border-box; }

/* --- Sticky Nav Menu --- */
.detail-sticky-nav { position: sticky; top: 0px; z-index: 100; background: #02325a; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.detail-sticky-nav ul { list-style: none; padding: 0; margin: 0; display: flex; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; }
.detail-sticky-nav li { flex: 0 0 auto; }
.detail-sticky-nav li { border-right: 1px solid #444; }
.detail-sticky-nav li:last-child { border-right: none; }
.detail-sticky-nav a { display: block; padding: 15px 25px; color: #fff; text-decoration: none; font-size: 14px; font-weight: 700; transition: background 0.3s; }
.detail-sticky-nav a:hover { background: var(--primary-color); }

/* --- Breadcrumb --- */
.breadcrumb { background: #f8fafc; padding: 12px 0; font-size: 13px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb span { margin: 0 8px; color: #ccc; }

/* --- KV Section --- */
.detail-kv { background: #fff; padding: 40px 0 0px; scroll-margin-top: 140px; }
.kv-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.kv-content-left { flex: 1; }
.kv-content-right { width: 220px; display: flex; justify-content: flex-end; }
.kv-header-row { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 15px; flex-direction: column;}
.kv-booth-num { background: #333; color: #fff; padding: 4px 12px; font-weight: 700; font-size: 14px; border-radius: 4px; }
.kv-name { font-size: 32px; font-weight: 700; color: #333; line-height: 1.2; }
.kv-status-signs { display: flex; gap: 10px; margin-bottom: 25px; }
.kv-status-signs span { padding: 4px 12px; border-radius: 4px; color: #fff; font-size: 14px; font-weight: 700; }
.sign-appt { background: #ff9800; }
.sign-online { background: #e91e63; }
.kv-lead-title { font-size: 24px; font-weight: 700; color: #333; margin-bottom: 20px; line-height: 1.4; }
.kv-meta-info { margin-top: 30px; }
.kv-category { display: inline-block; background: var(--category-green); color: var(--white); padding: 4px 15px; border-radius: 4px; font-size: 14px; margin-bottom: 10px; }
.kv-status-signs .kv-category { margin-bottom: 0; }
.kv-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kv-tags li { font-size: 13px; color: var(--text-muted); background: #f4f4f4; padding: 2px 10px; border: 1px solid var(--border-color); }
.kv-logo { background: var(--white); padding: 15px; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); width: 200px; text-align: center; }
.kv-logo img { max-width: 100%; height: auto; }

/* --- Section Settings --- */
.products-section, .videos-section, .materials-section, .spec-section { padding: 40px 0; border-bottom: 1px solid #f0f0f0; scroll-margin-top: 130px; }
.main-sec-title { font-size: 24px; font-weight: 700; color: var(--primary-color); margin-bottom: 40px; position: relative; padding-bottom: 15px; border-bottom: 1px solid #ccc; }
.main-sec-title::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 60px; height: 4px; background: var(--category-green); }

/* --- Products & Materials Layout (Width 35%) --- */
.product-item { margin-bottom: 60px; padding-bottom: 60px; border-bottom: 1px solid #eee; }
.product-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.product-layout-flex { display: flex; gap: 40px; }
.product-media-box { width: 35%; flex-shrink: 0; }
.product-text-box { flex: 1; display: flex; flex-direction: column; }
.product-title { font-size: 22px; font-weight: 700; color: var(--primary-color); margin-bottom: 15px; }
.sec-image img { width: 100%; max-height: 300px; border-radius: 8px; object-fit: contain; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.sec-image2 { width: 0%;}
.product-btn-area { margin-top: auto; padding-top: 25px; text-align: right; }
.btn-download { display: inline-block; background: #6e3175; color: #fff; padding: 9px 20px; border-radius: 20px; text-decoration: none; font-weight: 700; font-size: 13px; transition: 0.3s; }

/* --- Download List Layout --- */
.dl-list { border-top: 1px solid var(--border-color); }
.dl-item { display: flex; align-items: center; gap: 30px; padding: 18px 0; border-bottom: 1px solid var(--border-color); }
.dl-title { flex: 0 0 280px; color: var(--primary-color); text-decoration: none; font-size: 16px; font-weight: 700; line-height: 1.4; }
.dl-desc { flex: 1; font-size: 14px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.dl-btn-area { flex-shrink: 0; }
@media (max-width: 768px) {
    .dl-item { flex-wrap: wrap; gap: 10px; }
    .dl-title { flex: 0 0 100%; margin-bottom: 0;}
    .dl-desc { flex: 0 0 100%; }
    .dl-btn-area { flex: 0 0 100%; text-align: right; }
}

/* --- Videos Layout (Width 35%) --- */
.videos-list { display: flex; flex-direction: column; gap: 60px; }
.video-item-horizontal { display: flex; gap: 40px; }
.video-media { width: 35%; flex-shrink: 0; }
.video-info { flex: 1; }
.video-title { font-size: 22px; font-weight: 700; margin-bottom: 15px; line-height: 1.4; }
.iframe-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 6px; background: #000; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.iframe-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* --- Spec Table Layout --- */
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 50px;}
.spec-table th, .spec-table td { padding: 15px 20px; border: 1px solid var(--border-color); font-size: 14px; text-align: left; }
.spec-table th { background: #f9f9f9; width: 300px; font-weight: 700; color: #333; }
.spec-table td a { color: var(--primary-color); text-decoration: none; font-weight: 700; }

/* --- PageTop Arrow Button (Text-based) --- */
.detail-pagetop { position: fixed; bottom: 50px; right: 50px; z-index: 999; opacity: 0; visibility: hidden; transform: translateY(20px); transition: 0.4s; }
.detail-pagetop.is-show { opacity: 1; visibility: visible; transform: translateY(0); }
/* モーダル内ではexModal-pagetopのposition:absoluteを優先 */
.detail-pagetop.exModal-pagetop { position: absolute; }
.detail-pagetop_link { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; text-decoration: none; border-radius: 50%; transition: 0.3s; }
.detail-pagetop_link img { width: 100%; height: 100%; object-fit: contain; }
.detail-pagetop_link:hover { transform: scale(1.1); }
.page-top{opacity: unset;}

/* --- Image Lightbox (PC only) --- */
@media (min-width: 993px) {
    .js-img-zoom { cursor: zoom-in; }
}
.img-zoom-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 9998; justify-content: center; align-items: center; }
.img-zoom-overlay.is-open { display: flex; }
.img-zoom-inner { max-width: 90vw; max-height: 90vh; display: flex; }
.img-zoom-inner img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 4px; box-shadow: 0 8px 40px rgba(0,0,0,0.5); }
.img-zoom-close { position: fixed; top: 20px; right: 24px; width: 44px; height: 44px; background: #e53935; border: 3px solid #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; z-index: 9999; box-shadow: 0 2px 8px rgba(0,0,0,0.3); transition: all 0.3s; font-size: 0; }
.img-zoom-close:hover { background: #b71c1c; transform: scale(1.1) rotate(90deg); }
.img-zoom-close::before, .img-zoom-close::after { content: ''; position: absolute; width: 20px; height: 2px; background: #fff; border-radius: 2px; }
.img-zoom-close::before { transform: rotate(45deg); }
.img-zoom-close::after { transform: rotate(-45deg); }

/* --- モーダル内 override --- */
/* .exhibitor-detail の overflow-x:auto がスクロールコンテナを作り sticky が無効になるためリセット */
.exModal-overlay .exhibitor-detail { overflow: visible; max-height: none; }
/* 閉じるボタン(top:25px, height:44px) のスペース確保のため top: 70px に下げる */
.exModal-overlay .detail-sticky-nav { position: sticky; top: 0; z-index: 200; }

/* --- モーダル内スマホ最適化 --- */
@media (max-width: 768px) {
    .exModal-overlay .detail-sticky-nav { top: 0; padding-right: 0px; } /* SPでは横スクロールを考慮してパディングなし */
    .exModal-overlay .detail-sticky-nav a { padding: 10px 10px; font-size: 11px; }
    .exModal-overlay .nav-inner { padding: 0; position: relative; }
    .exModal-overlay .nav-fav { margin-right: 45px; } /* SP版閉じるボタンを避ける */
    .exModal-overlay .kv-name { font-size: 20px; }
    .exModal-overlay .kv-lead-title { font-size: 17px; }
    .exModal-overlay .kv-booth-num { font-size: 12px; }
    .exModal-overlay .product-title,
    .exModal-overlay .video-title { font-size: 16px; }
    .exModal-overlay .main-sec-title { font-size: 20px; }
    .exModal-overlay .spec-table th,
    .exModal-overlay .spec-table td { padding: 10px 12px; font-size: 12px; }
    .exModal-overlay .spec-table th { width: 100px; }
    .exModal-overlay .btn-download { padding: 6px 18px; font-size: 12px; }
    .exModal-overlay .sp-footmenu { display: none; }
}

/* --- Hamburger Button --- */
.nav-hamburger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 40px; height: 40px; background: none; border: none; cursor: pointer; padding: 4px; flex-shrink: 0; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: all 0.3s; transform-origin: center; }
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Mobile / UI Fixed --- */
.sp-footmenu { display: none; position: fixed; bottom: 0; left: 0; width: 100%; height: 60px; background: #fff; z-index: 1000; box-shadow: 0 -3px 12px rgba(0,0,0,0.1); }
@media (max-width: 992px) {
	.detail-sticky-nav { top: 40px; }
	.detail-sticky-nav a { padding: 12px 15px; font-size: 12px; }
	.kv-inner { flex-direction: column; gap: 0; }
	.kv-content-left { display: contents; }
	.kv-header-row { order: 1; }
	.kv-status-signs { order: 2; }
	.kv-content-right { order: 3; width: 100%; justify-content: center; margin-top: 10px; }
	.kv-logo { width: 120px; padding: 0; margin: 0 auto; box-shadow: none; background: none; text-align: center; }
	.kv-overview { order: 4; }
	.kv-category { order: 5; }
	.product-layout-flex, .video-item-horizontal { flex-direction: column; gap: 20px; }
	.product-media-box,.video-media { width: 100%; } .spec-table th { width: 150px; } }
@media (max-width: 768px) {
	 .sp-footmenu { display: none; }
	 .sp-menu-btn { flex: 1; text-align: center; line-height: 60px; font-weight: 700; text-decoration: none; color: #333; border-right: 1px solid #eee; }
	 .sp-menu-btn:last-child { background: var(--primary-color); color: #fff; border: none; }
	 .detail-pagetop { bottom: 85px; right: 20px; }
	 .detail-pagetop_link { width: 50px; height: 50px; }
	 .sign-appt, .sign-online { display: none; }
	 .kv-status-signs { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
	 .kv-booth-num, .kv-status-signs .kv-category { display: inline-block; width: auto; align-self: flex-start; }
	 .product-btn-area, .dl-btn-area { text-align: center; }
	 /* ハンバーガーメニュー */
	 .nav-hamburger { display: flex; }
	 .detail-sticky-nav .nav-menu { display: none; position: absolute; top: 100%; left: 0; width: 200px; background: #02325a; flex-direction: column; z-index: 300; box-shadow: 4px 4px 12px rgba(0,0,0,0.3); }
	 .detail-sticky-nav .nav-menu.is-open { display: flex; }
	 .detail-sticky-nav .nav-menu li { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.15); }
	 .detail-sticky-nav .nav-menu li:last-child { border-bottom: none; }
	 .detail-sticky-nav .nav-menu a { padding: 14px 20px; font-size: 13px; }
	 .detail-sticky-nav ul { overflow: visible; }
	 }

/* --- Favorite button (header) --- */
.header_fav { margin-left: 18px; display: flex; align-items: center; }
.fav-btn { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: none; padding: 4px 8px; cursor: pointer; box-shadow: none; transition: color .2s; }
.fav-btn .fav-heart { font-size: 22px; line-height: 1; color: #bbb; transition: color .2s; display: inline-block; }
.fav-btn .fav-text { font-size: 0.65em; color: #999; transition: color .2s; }
.fav-btn:hover .fav-heart { color: #f8a0c0; }
.fav-btn.is-favorited .fav-heart { color: #f06292; }
.fav-btn.is-favorited .fav-text { color: #f06292; }

@media (max-width: 768px) { .header_fav { margin-left: 8px; } }

/* --- Nav placement tweaks for favorite button --- */
.detail-sticky-nav .nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-sticky-nav ul { display: flex; align-items: center; gap: 0; }
.detail-sticky-nav .nav-fav { list-style: none; flex-shrink: 0; }
.exModal-overlay .nav-fav { margin-right: 85px; } /* PC版閉じるボタンを避ける */

.detail-sticky-nav .nav-fav .fav-btn { padding: 4px 8px; }
.detail-sticky-nav .nav-fav .fav-btn .fav-heart { font-size: 22px; }

@media (max-width: 992px) {
    .detail-sticky-nav .nav-fav .fav-btn { padding: 4px 6px; }
}

/* --- Mobile: sticky behavior fix for fav button --- */
@media (max-width: 768px) {
	.exModal-overlay .detail-sticky-nav .nav-inner { padding-right: 5px; }
	.exModal-overlay .detail-sticky-nav .nav-fav { margin-right: 50px; }
	/* スマホ：お気に入りボタン */
	.detail-sticky-nav .nav-fav .fav-btn { padding: 4px 8px; }
	.detail-sticky-nav .nav-fav .fav-btn .fav-heart { font-size: 26px; }
}

/* --- List favorite icon --- */
.list-fav-icon {
    width: auto;
    height: auto;
    background: none;
    border: none;
    border-radius: 0;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #bbb;
    transition: color 0.2s ease;
    box-shadow: none;
    line-height: 1;
}
.list-fav-icon::before { content: '♥'; }
.list-fav-icon.is-favorited {
    background: none;
    color: #f06292;
    border: none;
    box-shadow: none;
}
.list-fav-icon.is-favorited::before { content: '♥'; }


.result .title h2 { display: flex; align-items: center; font-size: 2.2rem; font-weight: 700; border-left: 5px solid #00408c; padding-left: 1.5rem; gap: 0; }
.result .title h2 span { font-size: 2rem; font-weight: 500; display: flex; align-items: center; }
.result .title h2 span::before { content: ""; width: 1px; height: 2.2rem; background: #00408c; margin: 0 2rem; }