/* おすすめ商品セクション - スライダー */
#goods_recommend .recommend-container,
#goods_recommend_detail .recommend-container {
	position: relative;
	overflow: hidden;
	padding-top: 20px; /* allow space for badges that protrude above item box */
}

/* Center and constrain the section title for index page sections while preserving underline decoration */
#goods_recommend .m-header_section.opt-ttl-h2,
#goods_search .m-header_section.opt-ttl-h2,
#netshop .m-header_section.opt-ttl-h2 {
    display: flex;
    justify-content: center; /* center the title horizontally */
}
#goods_recommend .m-header_section.opt-ttl-h2 .m-header_section_ttl,
#goods_search .m-header_section.opt-ttl-h2 .m-header_section_ttl,
#netshop .m-header_section.opt-ttl-h2 .m-header_section_ttl {
    max-width: 380px; /* limit the width of the title block */
    width: 100%;
    text-align: center; /* center the text within the constrained block */
    margin: 0; /* reset any inherited margins */
    box-sizing: border-box;
    padding-bottom: 20px; /* keep the spacing for the underline to show */
}

/* (Combined above for goods_recommend, goods_search, netshop) */

/* =====================
   Custom '無料コンテンツ' (#free) section styles
   - Monochrome heading
   - Heading + two items arranged horizontally (3 items total)
   - Heading has right vertical border on desktop/tablet; no border on mobile
   - 44px white circular badge with grey border and arrow sits to the right of the title
   - All three elements are slightly translucent
   - '詳細を見る' links inside this section use a bespoke style
   ===================== */
#free {
	display: flex;
	gap: 24px;
	align-items: center;
	justify-content: center;
	padding: 24px 0;
}

/* Free header: use unique class names to avoid global ::before rules */
#free .free-header {
	position: relative; /* for the circular badge */
	flex: 0 0 320px; /* fixed-ish width for title column */
	padding-right: 24px;
	box-sizing: border-box;
	border-right: 1px solid #d0d0d0; /* vertical divider on right */
	opacity: 0.9; /* slight translucency */
	display: flex;
	align-items: center;
	justify-content: flex-start;
	background: transparent;
}

#free .free-header .free-title {
	color: #000; /* monochrome */
	font-weight: 500;
	margin: 0;
	padding-bottom: 0; /* remove original underline spacing */
	border-bottom: none; /* override site-wide underline */
	position: relative;
	opacity: 0.9;
}

/* Match the netshop/title sizing: larger on tablet+ and desktop
   (lower min-width so tablet also receives the desktop-like sizing) */
@media print, screen and (min-width: 601px) {
	#free .free-header .free-title {
		font-size: 34px;
		padding-bottom: 20px; /* keep spacing similar to other headers */
	}
}

/* Tablet: slightly smaller title than desktop so text doesn't appear too large on iPad */
@media screen and (min-width: 601px) and (max-width: 1024px) {
	#free .free-header .free-title { font-size: 26px; }
}

/* circular 32px decorative badge placed inline with each item title (use .free-circle for decorative element) */
#free .free-circle,
#category-list-lower .free-circle,
#category-list-upper .free-circle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #ffffff;
	border: 1px solid #999999;
	color: #666666;
	font-size: 18px;
	text-decoration: none;
	margin-left: 8px;
	box-sizing: border-box;
}

/* show a right-arrow glyph inside the decorative badge */
#free .free-circle::before,
#category-list-lower .free-circle::before,
#category-list-upper .free-circle::before {
	content: "\2192"; /* → */
	display: inline-block;
	line-height: 1;
	font-size: 18px;
	color: inherit;
}

/* Wrapper anchor that makes the whole item block clickable */
.free-block-link {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	width: 100%;
	box-sizing: border-box;
	align-items: center; /* center image and text horizontally */
}

/* Keep images at their intrinsic width but prevent overflow; center them under the title */
.free-block-link .m-image_item img,
.free-block-link .m-image img,
.free-block-link figure img {
	display: block;
	width: auto;       /* do not force-stretch to 100% */
	max-width: 100%;   /* but don't overflow the column */
	height: auto;
	margin: 0 auto;    /* center inside the flex column */
}

/* Visually hidden text for accessibility inside circular link */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* Make the two content columns share remaining space and be translucent */
#free .m-col.opt-col-2 {
	flex: 1 1 0;
	opacity: 0.9; /* match translucency */
}

/* Category list upper: reuse #free item presentation for consistency */
#category-list-lower,
#category-list-upper {
	display: flex;
	gap: 24px;
	align-items: start;
	justify-content: center;
	padding: 24px 0;
}
#category-list-lower .m-col_list,
#category-list-upper .m-col_list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: center;
}

@media (max-width: 600px) {
	/* stack categories into 2 columns on mobile to match #free's mobile behavior */
	#category-list-lower,
	#category-list-upper {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}
}

/* Override global adjacent-item top margin inside #search_place so the first
   item doesn't 'pop up'. The site has a global rule that adds top margin to
   adjacent .m-col_item on small screens; neutralize that only for this section. */
@media only screen and (max-width: 950.98px) {
	#search_place .m-col.opt-col-2 .m-col_item + .m-col_item {
		margin-top: 0 !important;
	}
}

/* Ensure list items inside #free stack vertically (image above title) */
#free .m-col_list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: center; /* center children horizontally when stacked */
}

/* Align item title text and circular link vertically */
#category-list-lower .free-item-title,
#category-list-upper .free-item-title,
#free .free-item-title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	text-align: center; /* center the title text when stacked */
	font-weight: bold;
}

/* Custom link style for '詳細を見る' inside #free */
#free .m-link a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #ffffff;
	color: #333333;
	border: 1px solid #999999;
	padding: 8px 12px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 500;
}

#free .m-link a:hover {
	background: #f3f3f3;
}

/* Mobile: place header full-width on first row, two items side-by-side on second row */
@media (max-width: 600px) {
	#free {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto;
		grid-template-areas: "free-header free-header" "free-item-1 free-item-2";
		gap: 12px;
		align-items: start;
	}
	/* header occupies top row and gets modest vertical spacing */
	#free .free-header {
		grid-area: free-header;
		border-right: none;
		padding-right: 0;
		flex: none;
		margin: 8px 0; /* reduced vertical margins appropriate for a heading */
		justify-content: center;
		font-size: 26px;
	}
	/* two item columns placed on second row */
	#free > .m-col.opt-col-2:nth-of-type(1) {
		grid-area: free-item-1;
	}
	#free > .m-col.opt-col-2:nth-of-type(2) {
		grid-area: free-item-2;
	}
	/* ensure decorative badges are visible on mobile next to titles */
	#free .free-circle,
	#category-list-lower .free-circle,
	#category-list-upper .free-circle { display: inline-flex; }
}
#goods_recommend .slider-wrapper,
#goods_recommend_detail .slider-wrapper {
	display: flex;
	transition: transform 0.5s ease-in-out;
	will-change: transform;
	gap: 20px; /* spacing between cards */
}

/* Make #search_place follow #free layout and behavior */
#search_place {
	display: flex;
	gap: 24px;
	align-items: center;
	justify-content: center;
	padding: 24px 0;
}

#search_place .free-header {
	position: relative;
	flex: 0 0 320px;
	padding-right: 24px;
	box-sizing: border-box;
	border-right: 1px solid #d0d0d0;
	opacity: 0.9;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	background: transparent;
}

#search_place .free-title {
	color: #000;
	font-weight: 500;
	margin: 0;
	padding-bottom: 0;
	border-bottom: none;
	position: relative;
	opacity: 0.9;
}

@media print, screen and (min-width: 601px) {
	/* Apply larger title sizing on tablet and up to match desktop */
	#search_place .free-title { font-size: 34px; padding-bottom: 20px; }
}

/* Tablet: slightly smaller title than desktop so text doesn't appear too large on iPad */
@media screen and (min-width: 601px) and (max-width: 1024px) {
	#search_place .free-title { font-size: 26px; }
}

/* Ensure list items inside #search_place stack vertically (text only) */
#search_place .m-col_list { display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* Ensure the two columns share remaining space like #free on desktop */
#search_place .m-col.opt-col-2 {
	flex: 1 1 0;
	opacity: 0.9;
}

/* Match the free-item-title appearance */
#search_place .free-item-title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	text-align: center;
	font-weight: bold;
}

/* Decorative badge style and arrow for #search_place (reuse same .free-circle pattern) */
#search_place .free-circle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #ffffff;
	border: 1px solid #999999;
	color: #666666;
	font-size: 18px;
	text-decoration: none;
	margin-left: 8px;
	box-sizing: border-box;
}
#search_place .free-circle::before {
	content: "\2192";
	display: inline-block;
	line-height: 1;
	font-size: 18px;
	color: inherit;
}

/* Anchor that wraps text + decorative circle in search/place lists */
.free-link {
	text-decoration: none;
	color: inherit;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

@media (max-width: 600px) {
	#search_place {
		display: grid;
		/* single column on mobile: header, station list, channel list */
		grid-template-columns: 1fr;
		grid-template-rows: auto auto auto;
		grid-template-areas: "search-header" "search-col-1" "search-col-2";
		gap: 12px;
		align-items: start;
	}
	#search_place .free-header {
		grid-area: search-header;
		border-right: none;
		padding-right: 0;
		flex: none;
		margin: 8px 0;
		justify-content: center;
		font-size: 26px;
	}
	/* place the two right-side columns into the two grid cells */
	#search_place .search-right > .m-col.opt-col-2:nth-of-type(1) { grid-area: search-col-1; width: 100%; }
	#search_place .search-right > .m-col.opt-col-2:nth-of-type(2) { grid-area: search-col-2; width: 100%; }

	/* On mobile, make items inside each column form a 2-column grid (tag-like layout) */
	#search_place .m-col_list {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
		align-items: start;
		width: 100%;
		box-sizing: border-box;
	}

	/* Left-align items inside each grid cell on mobile (tag-like layout) */
	#search_place .m-col_list {
		justify-items: start;
	}
	#search_place .m-col_item {
		display: flex;
		justify-content: flex-start; /* align inner content to the left */
		align-items: center;
		width: 100%;
		box-sizing: border-box;
		padding-left: 8px; /* small inset so tags don't touch grid edges */
	}
	#search_place .m-col_item .m-txt {
		display: flex;
		justify-content: flex-start;
		align-items: center;
		width: 100%;
	}
	#search_place .free-item-title { text-align: left; }

	/* Make label widths consistent so circle icons align vertically
	   Use a reasonable min-width based on the longest label (大阪阿部野橋駅) */
	#search_place .free-link .free-label {
		display: inline-block;
		min-width: 110px; /* adjust if needed */
		max-width: calc(100% - 44px); /* leave room for the circle */
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

/* Desktop and tablet: arrange right side as two stacked rows (station row above channel row)
	and make each row display items horizontally */
@media (min-width: 601px) {
	#search_place {
		/* keep header on the left and right content as a single column */
		display: flex;
		align-items: flex-start;
	}
	#search_place .search-right {
		display: flex;
		flex-direction: column;
		gap: 16px;
		flex: 1 1 0;
	}
	/* station row: horizontal flow */
	#search_place #station-col.m-col_list {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 12px 20px; /* row gap / column gap */
		align-items: center;
		justify-content: flex-start;
	}
	/* channel row: horizontal flow */
	#search_place #channel-col.m-col_list {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 12px 20px;
		align-items: center;
		justify-content: flex-start;
	}
	/* each item in the rows should not be full-width; make them inline-like */
	#search_place .m-col_item { display: inline-flex; }
	#search_place .m-col_item .m-txt { display: inline-flex; }
}

@media (min-width: 601px) {
	/* Ensure the right column groups occupy full available width */
	#search_place .search-right { width: 100%; }
	#search_place #station-col.m-col_list,
	#search_place #channel-col.m-col_list { width: 100%; }

	/* Override any site-global percentage/column widths so items size to content */
	#search_place .m-col_item {
		display: inline-flex !important;
		-webkit-box-flex: 0 !important;
		-ms-flex: 0 1 auto !important;
		flex: 0 1 auto !important;
		width: auto !important;
		margin: 0 !important;
		white-space: nowrap; /* keep tag-like items on one line */
	}

	/* Let the flex container manage spacing between items; do NOT rely on per-item margin-left
	   because that breaks alignment when items wrap to a new line. Remove left-margin here
	   and rely on the container's gap. */
	#search_place #station-col.m-col_list > .m-col_item + .m-col_item,
	#search_place #channel-col.m-col_list > .m-col_item + .m-col_item {
		margin-left: 0 !important;
	}

	/* Safety: if a site-global rule still injects margin-left on adjacent items below 0.01 specificity,
	   enforce removal for any .m-col_item inside #search_place. */
	#search_place .m-col_item { margin-left: 0 !important; }

	/* Ensure channel row sits below station row (already column layout), with some top spacing */
	#search_place .search-right > .m-col.opt-col-2:nth-child(2) { margin-top: 12px; }
}

/* Override site-wide .m-col rules inside #search_place so items are
   variable-width, don't force equal flex sizing, and can wrap naturally. */
@media print, screen and (min-width: 601px) {
	/* Prevent global rule from forcing flex:1 on items */
	#search_place .m-col.opt-col-2 .m-col_item:not(.opt-col-image) {
		-webkit-box-flex: 0 !important;
		-ms-flex: 0 1 auto !important;
		flex: 0 1 auto !important;
	}

	/* Ensure margin logic from global nth-child rule doesn't break layout */
	#search_place .m-col.opt-col-2 .m-col_item,
	#search_place .m-col.opt-col-2 .m-col_item:nth-child(2n+1) {
		margin-left: 0 !important;
	}

	/* Make the station/channel rows behave like inline flows that wrap */
	#search_place #station-col.m-col_list,
	#search_place #channel-col.m-col_list {
		display: flex !important;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 12px 20px; /* vertical gap / horizontal gap */
		align-items: center;
		justify-content: flex-start;
	}

	/* Use inline-flex for items so their width equals content width */
	#search_place .m-col_item { display: inline-flex !important; }
	#search_place .m-col_item .m-txt { display: inline-flex !important; }
}

/* Ensure the section itself establishes a positioning context so buttons can be placed outside the inner overflow:hidden container */
#goods_recommend,
#goods_recommend_detail {
    position: relative;
}
/* Recommend card base styles moved to css/common_goods.css (shared) */

/* item widths for PC (4 visible) */
/* #goods_recommend .recommend-card { flex: 0 0 calc((100% - 60px) / 4); margin-right: 20px; } */
#goods_recommend .recommend-item:last-child,
#goods_recommend_detail .recommend-item:last-child { margin-right: 0; }
#goods_recommend .recommend-image,
#goods_recommend_detail .recommend-image {

    border: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 160px;
    width: auto;
    object-fit: contain;
    margin: auto;
    margin-bottom: 8px;
}
#goods_recommend .recommend-name,
#goods_recommend_detail .recommend-name { font-weight: bold; margin-bottom:6px; font-size:0.95rem; }
#goods_recommend .recommend-price,
#goods_recommend_detail .recommend-price { color: #000; font-weight: normal; margin-bottom:30px; text-align: right;}
#goods_recommend .recommend-tags,
#goods_recommend_detail .recommend-tags { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }

/* navigation buttons */

@media (max-width: 768px) {
    /* Mobile layout for recommend cards is centralized in css/common_goods.css */
}
/* 商品を探すセクション - 入力とボタンの装飾（企業サイト向け・硬め） */
#goods_search .search-form {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: center; /* center inner items when available space exists */
	width: 100%;
	max-width: 640px; /* keep the same max width */
	margin: 0 auto; /* center the form block horizontally */
	box-sizing: border-box;
}
#goods_search .search-form input[type="text"] {
	flex: 1 1 auto;
	padding: 10px 14px;
	height: 44px;
 	border: 1px solid #bfbfbf;
 	background: #ffffff;
 	color: #222;
 	font-size: 16px;
 	box-sizing: border-box;
 	border-radius: 4px;
 	outline: none;
 	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
#goods_search .search-form input[type="text"]:focus {
 	border-color: #004080;
 	box-shadow: 0 0 0 4px rgba(0,64,128,0.08);
}
#goods_search .search-form button {
 	background: #004080;
 	color: #ffffff;
 	border: 1px solid #003366;
 	padding: 10px 18px;
 	height: 44px;
 	cursor: pointer;
 	border-radius: 4px;
 	box-shadow: none;
	line-height: 1;
}
#goods_search .search-form button:hover {
 	background: #00315a;
}
#goods_search .search-form button:active {
 	background: #002541;
}
@media (max-width: 480px) {
 	#goods_search .search-form {
 		display: flex;
 		flex-direction: column;
 		gap: 8px;
 	}
	 #goods_search .search-form input[type="text"] {
	 	width: 100%;
	 	height: 44px;
	 }
	 /* Make button a normal-width centered button on mobile */
	 #goods_search .search-form button {
	 	width: auto;
	 	height: 44px;
	 	min-width: 120px; /* ensure tappable size */
	 	padding: 10px 18px;
	 	align-self: center; /* center the button inside the column layout */
	 	display: inline-flex; /* center text horizontally & vertically */
	 	align-items: center;
	 	justify-content: center;
	 	text-align: center;
	 	line-height: 1;
	 }
}
/* カテゴリリスト（サムネイル） - grid レイアウトで均等に配置 */
#goods_search .category-list {
	margin-top: 20px;
	display: grid;
	grid-template-columns: repeat(5, 1fr); /* PC: 5列に変更 */
	gap: 16px;
	align-items: start;
	width: 100%;
}
#goods_search .category-item {
	text-align: center;
	text-decoration: none;
	color: inherit;
	display: block;
	width: 100%;
}
#goods_search .category-item .thumb {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border: 1px solid #e6e6e6;
}
#goods_search .category-item .cat-name {
	margin-top: 8px;
	font-weight: 400; /* ノーマル */
	font-size: 0.95rem;
	color: #111;
}
@media (max-width: 1024px) {
	#goods_search .category-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
	/* スマホ: 3列にする（ご要望） */
	#goods_search .category-list { grid-template-columns: repeat(3, 1fr); }
	#goods_search .category-list { justify-items: center; }
	#goods_search .category-item .thumb { max-width: 100%; }
}
@media (max-width: 360px) {
	#goods_search .category-list { grid-template-columns: repeat(2, 1fr); }
}
.m-header_section { position: relative; }
.m-header_section .section-link-list {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	text-decoration: none;
	color: inherit;
}

input:focus::placeholder {
  color: transparent; /* フォーカス時に文字を透明にする */
}

/* ===== 特急部分　追加 ===== */

.expressInfo_train_item a {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 0;
    box-shadow: none;
    background: none;
    padding: 0;
}

/* 枠線は画像にのみ適用 */
.expressInfo_train_image {
    border: 1px solid #CCCCCC;
}

/* テキスト部分のスタイル */
.expressInfo_train_text {
    text-align: center;
    margin-top: 30px;
    font-weight: bold;
    font-size: 16px;
    color: #333; /* 文字色を再設定 */
}

/* 矢印のスタイル (既存の.free-circleからコピー) */
.expressInfo_arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #999999;
    color: #666666;
    font-size: 18px;
    text-decoration: none;
    margin-left: 8px;
    box-sizing: border-box;
    vertical-align: middle; /* テキストと高さを合わせる */
}
.expressInfo_arrow::before {
    content: "\2192"; /* → */
    display: inline-block;
    line-height: 1;
    font-size: 18px;
    color: inherit;
}

/* PC レイアウト */
@media (min-width: 950.98px) {
    .expressInfo_train_list {
        display: flex;
        gap: 24px;
        justify-content: center;
    }
	.expressInfo .expressInfo_train_item+.expressInfo_train_item {
        margin-left: 0px;
    }

    .expressInfo_train_item {
        flex: 1;
        min-width: 0;
    }
}

/* スマホ・タブレット レイアウト */
@media (max-width: 950.97px) {
    .expressInfo_train_item {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    .expressInfo_train_item:not(:last-child) {
        margin-bottom: 20px;
    }
}

/* iPad（タブレット）用：2列表示、最終行中央寄せ */
@media (min-width: 600px) and (max-width: 950.97px) {
    .expressInfo_train .container-sp {
        max-width: 100%;
        padding: 0 40px;
        box-sizing: border-box;
    }
    .expressInfo_train_list {
        display: flex;
        flex-wrap: wrap;
        justify-content: center; /* 奇数の場合、中央に配置 */
        gap: 24px;
    }
    .expressInfo_train_item {
        width: calc(50% - 12px);
        max-width: none;
        margin: 0;
    }
    .expressInfo_train_item:not(:last-child) {
        margin-bottom: 0;
    }
}
/* グラデーション背景を無効化するための追加スタイル */
.expressInfo .expressInfo_train_item > a::before {
    background: none !important;
}
/* ドロップシャドウ、角丸、背景色をリセットするための追加スタイル */
.expressInfo .expressInfo_train_item > a {
    box-shadow: none !important;
    border-radius: 0 !important;
    background-color: transparent !important;
}