/* 基本スタイル */
body {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0;
}

main {
	padding: 10px;
}

table {
	border: none;
	width: 100%;
}

th,
td {
	padding: 10px;
}

td input {
	font-size: 20px;
	padding: 12px 24px;
}

td select {
	font-size: 20px;
	padding: 12px;
	width: 100%;
	max-width: 400px;
}

/* 商品リストのグリッドレイアウト */
.products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	margin-top: 20px;
}

/* 商品カード */
.products-grid ul {
	margin: 0;
	padding: 15px;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	height: 100%;
}

.products-grid li {
	padding: 5px;
	font-size: 16px;
	list-style: none;
}

.products-grid li.tana {
	padding: 5px;
	font-size: 14px;
	color: #666;
	background: #f5f5f5;
	border-radius: 4px;
	text-align: center;
}

.products-grid li.price {
	padding: 15px;
	color: #fff;
	font-size: 28px;
	font-weight: bold;
	background: #f7931e;
	border-radius: 8px;
	text-align: center;
	margin: 10px 0;
}

.products-grid li.img {
	margin: 10px 0;
	padding: 0;
	height: auto;
	min-height: 200px;
	max-height: 300px;
	overflow: hidden;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fafafa;
	border-radius: 4px;
}

.products-grid li.img img {
	max-width: 100%;
	max-height: 300px;
	height: auto;
	width: auto;
	object-fit: contain;
}

p {
	width: 100%;
}

p img {
	margin: 0 auto;
	width: 100%;
	max-width: 100%;
	height: auto;
	display: block;
}

/* Common cart button styles */
.cart-fixed {
	display: flex;
	gap: 10px;
	align-items: center;
}

/* スマホ対応 */
@media screen and (max-width: 768px) {
	.products-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	td input {
		font-size: 18px;
	}

	td select {
		font-size: 18px;
		max-width: 100%;
	}

	.products-grid li {
		font-size: 15px;
	}

	.products-grid li.price {
		font-size: 20px;
		padding: 12px;
	}

	.products-grid li.img {
		min-height: 300px;
	}

	p img {
		max-width: 100%;
	}

	.cart-fixed {
		display: none;
	}
}

/* カテゴリータブ */
.category-tabs-wrapper {
	margin-bottom: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	/* 行間の隙間 */
}

.category-tabs {
	display: flex;
	gap: 10px;
	padding: 2px 0 10px 0;
	/* 下部のスクロールバー用のゆとり */
	white-space: nowrap;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* スクロールバーを整える */
.category-tabs::-webkit-scrollbar {
	height: 6px;
}

.category-tabs::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 3px;
}

.category-tabs a {
	display: inline-block;
	padding: 10px 20px;
	background: #f8f9fa;
	color: #333;
	text-decoration: none;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.3s;
	border: 2px solid transparent;
}

.category-tabs a:hover {
	background: #e9ecef;
	transform: translateY(-1px);
}

.category-tabs a.active {
	background: #f7931e;
	color: white;
	border-color: #d37a12;
}

.category-tabs a .count {
	font-size: 12px;
	opacity: 0.8;
	margin-left: 4px;
}

@media screen and (max-width: 768px) {
	.category-tabs a {
		padding: 8px 16px;
		font-size: 13px;
	}
}

/* Sale Countdown Timer */
.sale-countdown-wrapper {
	background: #d00000;
	color: #fff;
	padding: 5px 10px;
	border-radius: 4px;
	text-align: center;
	margin: 5px 0;
	font-size: 13px;
	font-weight: bold;
	display: inline-block;
	width: 100%;
	box-sizing: border-box;
	max-width: 100%;
}

.sale-countdown-label {
	font-size: 11px;
	display: block;
	opacity: 0.9;
	margin-bottom: 2px;
}

.sale-timer {
	font-family: 'Helvetica Neue', Arial, sans-serif;
	font-size: 14px;
	font-weight: 700;
}

.sale-timer .unit {
	margin: 0 1px;
}

/* Detail page specific adjustments */
.product-detail .sale-countdown-wrapper {
	margin: 10px 0;
	font-size: 16px;
	max-width: 400px;
}

.product-detail .sale-timer {
	font-size: 20px;
}

.sale-title-badge {
	display: inline-block;
	background: #e74c3c;
	color: white;
	font-size: 12px;
	padding: 3px 8px;
	border-radius: 4px;
	vertical-align: middle;
	margin-right: 5px;
	font-weight: bold;
}