/* DUGA Auto Plugin — フロント表示用スタイル */

/* 本文に埋め込むボタン */
.dga-button-wrap {
	text-align: center;
	margin: 1.4em 0;
}
.dga-button {
	display: block;
	width: 100%;
	max-width: 560px;
	margin: 0 auto;
	padding: 1em 1.5em;
	box-sizing: border-box;
	font-weight: 700;
	font-size: 1.1em;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	border-radius: 6px;
	box-shadow: 0 2px 6px rgba( 0, 0, 0, 0.18 );
	transition: transform 0.08s ease, box-shadow 0.15s ease;
}
.dga-button:hover {
	transform: translateY( -1px );
	box-shadow: 0 4px 10px rgba( 0, 0, 0, 0.24 );
}

/* サンプル画像グリッド（[sample-grid] / [sample-grid2]） */
.dga-gallery {
	display: grid;
	gap: 8px;
	margin: 1.4em 0;
}
/* 縦1列（[sample-grid1]）: 大きく見せつつ、間延びしないよう最大幅を制限。 */
.dga-gallery-cols-1 {
	grid-template-columns: 1fr;
	gap: 12px;
	max-width: 864px;
	margin-left: auto;
	margin-right: auto;
}
.dga-gallery-cols-2 { grid-template-columns: repeat( 2, 1fr ); }
.dga-gallery-cols-3 { grid-template-columns: repeat( 3, 1fr ); }
.dga-gallery-cols-4 { grid-template-columns: repeat( 4, 1fr ); }

.dga-gallery-item {
	display: block;
	line-height: 0;
	border-radius: 4px;
	overflow: hidden;
	transition: opacity 0.15s ease;
}
.dga-gallery-item:hover {
	opacity: 0.85;
}
.dga-gallery-item img {
	width: 100%;
	height: auto;
	display: block;
}

@media ( max-width: 600px ) {
	.dga-gallery-cols-3,
	.dga-gallery-cols-4 { grid-template-columns: repeat( 2, 1fr ); }
}

/* サンプル画像の横並び（[sample-flex]） */
.dga-flex {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: flex-start;
	margin: 1em 0;
}
.dga-flex-item {
	flex: 0 0 auto;
	width: calc( 25% - 6px );
	max-width: 130px;
}
.dga-flex-item img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
}

/* [duga] 単一表示カード */
.dga-single {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 1.6em 0;
	padding: 16px;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	background: #fff;
}
.dga-single-media {
	flex: 0 0 240px;
	max-width: 100%;
}
.dga-single-media img {
	width: 100%;
	height: auto;
	border-radius: 6px;
	display: block;
}
.dga-single-body {
	flex: 1 1 300px;
	min-width: 0;
}
.dga-single-title {
	margin: 0 0 0.6em;
	font-size: 1.15em;
	line-height: 1.4;
}
.dga-single-caption {
	font-size: 0.92em;
	color: #444;
	margin: 0 0 1em;
}
.dga-single-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1em;
	font-size: 0.9em;
}
.dga-single-table th,
.dga-single-table td {
	border: 1px solid #e5e5e5;
	padding: 6px 10px;
	text-align: left;
	vertical-align: top;
}
.dga-single-table th {
	width: 6em;
	background: #f7f7f7;
	white-space: nowrap;
}

/* [duga_list] グリッド */
.dga-grid {
	display: grid;
	gap: 14px;
	margin: 1.4em 0;
}
.dga-cols-1 { grid-template-columns: repeat( 1, 1fr ); }
.dga-cols-2 { grid-template-columns: repeat( 2, 1fr ); }
.dga-cols-3 { grid-template-columns: repeat( 3, 1fr ); }
.dga-cols-4 { grid-template-columns: repeat( 4, 1fr ); }
.dga-cols-5 { grid-template-columns: repeat( 5, 1fr ); }
.dga-cols-6 { grid-template-columns: repeat( 6, 1fr ); }

/* カードはジャケット画像そのものを主役にし、文字は画像の上に重ねる。
   （白いカード背景がテーマの背景から浮くのを避けるため） */
.dga-card {
	display: block;
	position: relative;
	text-decoration: none;
	color: inherit;
	border: 0;
	border-radius: 6px;
	overflow: hidden;
	background: transparent;
	transition: box-shadow 0.15s ease, transform 0.08s ease;
}
.dga-card:hover {
	box-shadow: 0 4px 14px rgba( 0, 0, 0, 0.35 );
	transform: translateY( -2px );
}
/* DUGAのジャケットは縦長（約500x714）なので、それに合わせた比率にする。 */
.dga-card-thumb {
	display: block;
	position: relative;
	aspect-ratio: 5 / 7;
	background: #1c1c1c;
	overflow: hidden;
}

/* 順位バッジ（[duga_list rank="1"]） */
.dga-badge-rank {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	min-width: 2.4em;
	padding: 3px 6px;
	font-size: 0.75em;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	color: #fff;
	background: rgba( 0, 0, 0, 0.7 );
	border-bottom-right-radius: 6px;
}
.dga-badge-rank.dga-badge-top {
	background: #e4007f;
}
.dga-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.dga-noimg {
	display: block;
	width: 100%;
	height: 100%;
}
/* タイトル・価格はジャケットの上に、下から黒グラデを敷いて重ねる。 */
.dga-card-body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 24px 7px 6px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	pointer-events: none;
	background: linear-gradient(
		to top,
		rgba( 0, 0, 0, 0.88 ) 0%,
		rgba( 0, 0, 0, 0.6 ) 45%,
		rgba( 0, 0, 0, 0 ) 100%
	);
}
.dga-card-title {
	color: rgba( 255, 255, 255, 0.92 );
	font-size: 0.72em;
	font-weight: 400;
	line-height: 1.3;
	text-shadow: 0 1px 3px rgba( 0, 0, 0, 0.9 );
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.dga-card-price {
	color: rgba( 255, 255, 255, 0.75 );
	font-weight: 700;
	font-size: 0.7em;
	text-shadow: 0 1px 3px rgba( 0, 0, 0, 0.9 );
}
.dga-empty {
	color: #888;
	padding: 1em;
	text-align: center;
}

/* ===================================================================
   ランキングリスト（[duga_ranking]）
   縦1列なので件数・画面幅によらず崩れない。
   テーマの明暗どちらでも成立するよう、色は半透明と inherit を基本にする。
   =================================================================== */
.dga-ranking {
	list-style: none;
	margin: 1.4em 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	counter-reset: none;
}
.dga-ranking .dga-rank-item {
	list-style: none;
	margin: 0;
	padding: 0;
}
.dga-ranking .dga-rank-item::before,
.dga-ranking .dga-rank-item::marker {
	content: none;
}
.dga-rank-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px;
	text-decoration: none;
	color: inherit;
	border-radius: 8px;
	background: rgba( 128, 128, 128, 0.08 );
	transition: background 0.15s ease, transform 0.08s ease;
}
.dga-rank-link:hover {
	background: rgba( 128, 128, 128, 0.18 );
	transform: translateX( 2px );
}

/* 順位 */
.dga-rank-num {
	flex: 0 0 auto;
	width: 2em;
	height: 2em;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-weight: 700;
	font-size: 0.9em;
	line-height: 1;
	color: #fff;
	background: rgba( 128, 128, 128, 0.55 );
}
.dga-rank-num.dga-rank-1 { background: #d4af37; }
.dga-rank-num.dga-rank-2 { background: #9b9b9b; }
.dga-rank-num.dga-rank-3 { background: #b87333; }

/* サムネイル */
.dga-rank-thumb {
	flex: 0 0 72px;
	width: 72px;
	aspect-ratio: 5 / 7;
	display: block;
	border-radius: 4px;
	overflow: hidden;
	background: #1c1c1c;
}
.dga-rank-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* テキスト */
.dga-rank-body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.dga-rank-title {
	font-size: 0.9em;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.dga-rank-meta {
	font-size: 0.78em;
	opacity: 0.7;
}

@media ( max-width: 480px ) {
	.dga-rank-thumb {
		flex-basis: 60px;
		width: 60px;
	}
	.dga-rank-title { font-size: 0.85em; }
}

@media ( max-width: 782px ) {
	.dga-cols-4,
	.dga-cols-5,
	.dga-cols-6 { grid-template-columns: repeat( 3, 1fr ); }
	.dga-flex-item { width: calc( 33.333% - 6px ); }
	.dga-single-media { flex-basis: 100%; }
}
@media ( max-width: 480px ) {
	.dga-cols-3,
	.dga-cols-4,
	.dga-cols-5,
	.dga-cols-6 { grid-template-columns: repeat( 2, 1fr ); }
}
