/* RWD 響應式補丁 - 不動原本 common.css，用覆蓋方式 */

/* 手機版/桌面版圖片切換 */
.mobile-only {
	display: none;
}

/* 手機版 logo - PC 隱藏 */
#menu_list .mobile_logo {
	display: none;
}

/* 漢堡選單按鈕 */
#hamburger {
	display: none;
	position: absolute;
	top: 8px;
	right: 10px;
	width: 36px;
	height: 36px;
	cursor: pointer;
	z-index: 10001;
	background: none;
	border: none;
	padding: 0;
}
#hamburger span {
	display: block;
	width: 28px;
	height: 3px;
	margin: 5px auto;
	background-color: #ff6600;
	transition: 0.3s;
}
#mobile_menu {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255,255,255,0.97);
	z-index: 10002;
	padding-top: 60px;
	text-align: center;
	transform: translateY(-30px);
	opacity: 0;
	transition: transform 0.3s ease, opacity 0.3s ease;
}
#mobile_menu.open {
	display: block;
	transform: translateY(0);
	opacity: 1;
}
#mobile_menu a {
	display: block;
	padding: 15px 0;
	font-size: 18px;
	color: #333;
	text-decoration: none;
	border-bottom: 1px solid #eee;
}
#mobile_menu a:hover {
	color: #ff6600;
}
#mobile_menu .close_btn {
	position: absolute;
	top: 10px;
	right: 15px;
	font-size: 30px;
	cursor: pointer;
	color: #333;
	background: none;
	border: none;
}

/* ===== Tablet: <= 980px ===== */
@media screen and (max-width: 980px) {
	#head_content {
		width: calc(100% - 20px) !important;
		max-width: 980px !important;
	}
	#menu_content,
	#menu_over,
	#menu_hit,
	#main_list,
	#foot_content,
	#top_content,
	#ad_top {
		width: 100% !important;
		max-width: 980px !important;
	}

	#ad_top, #ad_top ul.list li {
		width: 100% !important;
		height: auto !important;
	}
	#ad_top {
		height: auto !important;
	}
	#ad_top img {
		width: 100% !important;
		height: auto !important;
	}

	#product_block {
		width: 100% !important;
		padding-left: 0 !important;
		display: flex;
		flex-wrap: wrap;
		/* justify-content: center; */
		gap: 10px;
	}
	#product_block .product {
		width: calc(33.33% - 20px);
		/* min-width: 200px; */
		margin-right: 0 !important;
	}
	#product_block .vsep10 {
		display: none !important;
	}

	#news_block {
		width: 100% !important;
		float: none !important;
		padding: 10px 20px;
	}

	#foot_content {
		padding: 0 10px;
		box-sizing: border-box;
	}
	#foot_content .copyright {
		position: static !important;
		text-align: center;
		width: 100% !important;
		clear: both;
	}
}

/* ===== Mobile: <= 980px ===== */
@media screen and (max-width: 980px) {
	/* 基礎字體放大 */
	body {
		font-size: clamp(14px, 3.5vw, 18px);
	}

	/* Header */
	#head_list {
		height: auto !important;
		position: relative !important;
	}
	#head_content {
		height: auto !important;
		padding: 5px 10px !important;
	}

	/* Banner */
	#ad_list {
		height: auto !important;
		overflow: hidden;
	}
	#ad_top {
		width: 100% !important;
		height: auto !important;
		overflow: hidden;
	}
	#ad_top ul.list {
		width: 100% !important;
	}
	#ad_top ul.list li {
		width: 100% !important;
		height: auto !important;
	}
	#ad_top ul.list li img {
		width: 100% !important;
		height: auto !important;
	}

	/* 隱藏桌面選單，顯示漢堡 */
	#menu_list {
		position: sticky;
		top: 0;
		z-index: 9999;
		height: auto !important;
	}
	#menu_content,
	#menu_over,
	#menu_hit {
		display: none !important;
	}
	#menu_shadow {
		display: none !important;
	}
	#hamburger {
		display: block !important;
		position: absolute;
		top: 8px;
		right: 10px;
		z-index: 10001;
	}
	#menu_list {
		position: sticky;
		top: 0;
		z-index: 9999;
		overflow: visible !important;
		box-shadow: 0 2px 4px rgba(0,0,0,0.33);
	}
	#menu_list .mobile_logo {
		display: block;
		height: 45px;
		padding: 3px 10px;
	}
	#menu_list .mobile_logo img {
		height: 100%;
		width: auto;
	}

	/* Main */
	#main_list {
		top: 0 !important;
		padding: 10px;
		box-sizing: border-box;
	}

	/* #product_block .product {
		width: calc(50% - 10px) !important;
		min-width: 140px;
	} */
	#product_block .thumb,
	#product_block .thumb img {
		width: 100% !important;
		height: auto !important;
	}
	#product_block .class0,
	#product_block .class1,
	#product_block .class2 {
		width: auto !important;
	}
	#product_block .price {
		position: static !important;
		width: auto !important;
		text-align: left !important;
	}

	/* News */
	#news_block {
		clear: both !important;
		width: 100% !important;
	}
	#news_block .fb_like_box {
		width: 100% !important;
		max-width: 300px;
	}

	/* Footer */
	#foot_list {
		height: auto !important;
	}
	#foot_content {
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
	#foot_content .logo {
		width: 120px !important;
		height: 80px !important;
		background-size: contain !important;
		background-repeat: no-repeat !important;
		float: none !important;
	}
	#foot_content .data {
		width: 100% !important;
		height: auto !important;
		float: none !important;
		padding: 10px !important;
		box-sizing: border-box;
		font-size: 0.85rem;
		line-height: 22px !important;
		word-break: break-all;
	}
	#foot_content .data .sep41 {
		display: none !important;
	}
	#foot_content .copyright {
		position: static !important;
		width: 100% !important;
		text-align: center;
		padding-bottom: 10px;
	}

	/* Go Top */
	#top_content .top {
		left: auto !important;
		right: 10px !important;
	}
}

/* ===== Small Mobile: <= 700px ===== */
@media screen and (max-width: 700px) {
	#product_block .product {
		width: calc(50% - 20px) !important;
		/* min-width: 200px; */
	}

	#foot_content .data {
		font-size: 11px;
	}
}

/* ===== Small Mobile: <= 360px ===== */
@media screen and (max-width: 360px) {
	#product_block .product {
		width: 100% !important;
		max-width: 220px;
	}

	#foot_content .data {
		font-size: 11px;
	}
}

/* ============================================
   子頁面 RWD（news, about, publication,
   product, order, search）
   ============================================ */

/* ===== Tablet: <= 980px ===== */
@media screen and (max-width: 980px) {
	/* 所有子頁面共用 */
	#head_pic_content {
		width: 100% !important;
		background-size: cover;
	}
	#main_content {
		width: 100% !important;
		box-sizing: border-box;
	}

	/* 表格自適應 */
	table {
		/* width: 100% !important; */
		width: auto !important;
		min-width: 100%;
	}
	thead, tbody, th, td, tr {
		display: revert;
	}
	.width100p {
		width: 100% !important;
		box-sizing: border-box;
	}

	/* product 頁 */
	#submenu {
		width: 100% !important;
		float: none !important;
		margin-left: 0 !important;
		padding: 0 10px;
		box-sizing: border-box;
	}
	#content {
		width: 100% !important;
		float: none !important;
		padding: 10px !important;
		box-sizing: border-box;
	}
	#content .product_title {
		width: 100% !important;
	}
	#pro_intro {
		width: 100% !important;
	}
	#pro_intro .img {
		width: 100% !important;
		float: none !important;
		text-align: center;
	}
	#pro_intro .img img {
		max-width: 100%;
		height: auto;
	}
	#pro_intro .data {
		width: 100% !important;
		float: none !important;
		padding-left: 0 !important;
		padding-top: 10px;
	}
	.abgne_tab {
		width: 100% !important;
		box-sizing: border-box;
	}
	.tab_content img {
		max-width: 100% !important;
		height: auto !important;
	}
	#product_block .sub_sep {
		width: 100% !important;
	}

	/* news 頁 */
	#news_content {
		width: 100% !important;
		float: none !important;
		box-sizing: border-box;
		padding: 10px !important;
	}
	#news_content img {
		max-width: 100% !important;
		height: auto !important;
	}
	#news_line {
		width: 100% !important;
	}

	/* order / search 頁 */
	#order {
		width: 100% !important;
		float: none !important;
		box-sizing: border-box;
	}
	.pro_order {
		width: 100% !important;
	}

	/* news 列表的 fb box */
	.fb_like_box {
		width: 100% !important;
		max-width: 470px;
		margin-left: 0 !important;
	}

	/* about / publication 圖片 */
	#main_content img {
		max-width: 100%;
		height: auto;
	}
	#main_content .link {
		padding-left: 10px !important;
	}

	/* title 區塊 */
	#title {
		float: none !important;
		margin-bottom: 10px;
	}

	/* calendar */
	#calendar {
		width: 100% !important;
	}
}

/* ===== Mobile: <= 980px ===== */
@media screen and (max-width: 980px) {
	/* 子頁面 head pic */
	#head_pic_list {
		height: auto !important;
		min-height: 50px;
	}
	/* #head_pic_content {
		height: auto !important;
		min-height: 50px;
		background-size: cover;
	} */
}

/* ===== Mobile: <= 980px ===== */
@media screen and (max-width: 980px) {
	/* 表格橫向捲動 */
	table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	thead, tbody, th, td, tr {
		display: revert;
	}

	/* news 日期+標題 */
	#news_content .date {
		width: 100% !important;
		float: none !important;
	}
	#news_content .title {
		width: 100% !important;
		float: none !important;
	}

	/* product submenu 改橫排 */
	#submenu {
		display: flex;
		flex-wrap: wrap;
		gap: 5px;
		align-items: center;
	}
	#submenu .title,
	#submenu .class {
		width: auto !important;
	}
	#submenu .sub_text {
		width: auto !important;
		padding: 0 10px;
		height: 32px !important;
		line-height: 32px !important;
		border: 1px solid #ddd;
		border-radius: 4px;
	}
	#submenu .sub_sep {
		display: none;
	}
	#submenu .vsep10 {
		width: 100% !important;
		height: 0px !important;
	}

	/* product 列表卡片 */
	#content #product_block .product {
		width: calc(50% - 20px) !important;
	}
	#content #product_block .vsep30 {
		display: none !important;
	}

	/* pro_notify 位置修正 */
	#pro_notify_btn {
		position: static !important;
		padding-left: 0 !important;
		padding-top: 10px;
	}
	#pro_notify {
		position: static !important;
	}

	/* order 頁面 input */
	#order input[type="text"],
	#order select,
	#order textarea {
		max-width: 100%;
		box-sizing: border-box;
	}

	/* order 頁面 .about 字體 */
	#order .about {
		font-size: 1rem;
	}

	/* search form */
	#search_form input[type="text"] {
		max-width: 200px;
	}
}

/* ===== Small Mobile: <= 360px ===== */
@media screen and (max-width: 360px) {
	/* product 列表改單欄 */
	#content #product_block .product {
		width: 100% !important;
		max-width: 220px;
	}

	/* 表格字體縮小 */
	table, th, td {
		font-size: 0.875rem;
	}
	td.item {
		width: 70px !important;
	}
}

/* ===== Order 頁面手機版卡片式 table: <= 700px ===== */
@media screen and (max-width: 700px) {
	/* 圖片切換：隱藏桌面版，顯示手機版 */
	.pc-only {
		display: none !important;
	}
	.mobile-only {
		display: block !important;
		width: 100%;
		height: auto;
	}
	.copyright {
		font-size: 13px !important;
		line-height: 120%;
	}

	#order table {
		display: block;
		width: 100% !important;
		border: none;
	}
	#order table thead {
		display: none;
	}
	#order table tbody {
		display: block;
	}
	#order table tr {
		display: block;
		margin-bottom: 10px;
		border: 1px solid #fabf00;
		border-radius: 6px;
		padding: 8px;
		background: #fffef5;
	}
	#order table tr:first-child {
		background: #fabf00;
		border-radius: 6px;
		text-align: center;
		font-weight: bold;
	}
	#order table th {
		display: block;
		width: 100% !important;
		border: none;
		border-radius: 6px;
		margin-bottom: 10px;
	}
	#order table td {
		display: block;
		width: 100% !important;
		border: none;
		border-bottom: 1px dashed #f0d060;
		padding: 6px 4px;
		text-align: left !important;
		height: auto;
		line-height: 1.6;
		font-size: 1rem;
	}
	#order table td[colspan]:empty {
		display: none;
	}
	#order table td:last-child {
		border-bottom: none;
	}
	#order table td.item,
	#order table td.item2 {
		width: 100% !important;
		background: #fff8e0;
		font-weight: bold;
	}
	#order table td.subtitle {
		background: #ffffcc;
		font-weight: bold;
		border-bottom: 1px solid #fabf00;
	}
	#order table td:before {
		content: attr(data-label);
		font-weight: bold;
		display: inline-block;
		margin-right: 6px;
		color: #996600;
	}
	#order table input[type="text"],
	#order table select,
	#order table textarea {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box;
	}
	#order .pro_order {
		width: 100% !important;
	}
}