/*
======================================
    Return and Exchange Page
    退換貨說明頁面樣式
    配色：--accent-color / --primary-color（style.css :root）
======================================
*/

/* Hero */
.rex-hero {
	background: linear-gradient(135deg, rgba(3, 76, 140, 0.08) 0%, rgba(1, 72, 140, 0.06) 50%, #f5f9fc 100%);
	padding: 48px 24px 40px;
	text-align: center;
}

.rex-hero__inner {
	max-width: 720px;
	margin: 0 auto;
}

.rex-hero__eyebrow {
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--accent-color, #034c8c);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.rex-hero__title {
	margin: 0 0 16px;
	font-size: 36px;
	font-weight: 700;
	color: var(--secondary-color, #333);
	line-height: 1.25;
}

.rex-hero__desc {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	color: var(--text-light, #666);
}

/* Main content */
.rex-main {
	max-width: 800px;
	margin: 0 auto;
	padding: 32px 24px 64px;
}

.rex-content {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Card */
.rex-card {
	background: var(--white, #fff);
	border-radius: 12px;
	border: 1px solid var(--border-color, #d2d2d2);
	box-shadow: 0 2px 8px rgba(3, 76, 140, 0.06);
	overflow: hidden;
	display: flex;
	gap: 20px;
	padding: 24px 28px;
	align-items: flex-start;
}

.rex-card--warning {
	border-left: 4px solid var(--primary-color, #ffaa01);
	background: linear-gradient(to right, rgba(255, 170, 1, 0.12) 0%, #fff 14%);
}

.rex-card--info {
	border-left: 4px solid var(--accent-color, #034c8c);
	background: linear-gradient(to right, rgba(3, 76, 140, 0.08) 0%, #fff 14%);
}

.rex-card--tip {
	border-left: 4px solid #10b981;
	background: linear-gradient(to right, #ecfdf5 0%, #fff 12%);
}

.rex-card__icon {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--primary-color, #ffaa01);
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.rex-card--info .rex-card__icon {
	background: var(--accent-color, #034c8c);
}

.rex-card--tip .rex-card__icon {
	background: #10b981;
}

.rex-card__icon--info {
	font-style: italic;
	font-size: 16px;
}

.rex-card__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.rex-card__title {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 700;
	color: #111827;
	line-height: 1.35;
}

.rex-card__header .rex-card__title {
	margin-bottom: 0;
}

.rex-card__badge {
	font-size: 11px;
	padding: 4px 10px;
	background: #f3f4f6;
	color: #6b7280;
	border-radius: 6px;
	font-weight: 500;
}

.rex-card__body {
	flex: 1;
	min-width: 0;
}

.rex-card__text-zh {
	margin: 0 0 8px;
	font-size: 15px;
	line-height: 1.65;
	color: #374151;
}

.rex-card__text-en {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: #6b7280;
	padding-left: 12px;
	border-left: 2px solid #e5e7eb;
}

.rex-card__text-en--small {
	font-size: 12px;
	margin-top: 12px;
}

.rex-card__list {
	margin-top: 16px;
	padding: 16px;
	background: #f9fafb;
	border-radius: 8px;
}

.rex-card__list-title {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 600;
	color: #374151;
}

.rex-card__list ul {
	margin: 0 0 12px;
	padding-left: 20px;
}

.rex-card__list li {
	margin-bottom: 6px;
	font-size: 14px;
	line-height: 1.5;
	color: #4b5563;
}

.rex-card__list li:last-child {
	margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
	.rex-hero {
		padding: 32px 20px 28px;
	}

	.rex-hero__title {
		font-size: 28px;
	}

	.rex-hero__desc {
		font-size: 15px;
	}

	.rex-main {
		padding: 24px 16px 48px;
	}

	.rex-card {
		flex-direction: column;
		gap: 16px;
		padding: 20px;
	}

	.rex-card__icon {
		width: 32px;
		height: 32px;
		font-size: 16px;
	}

	.rex-card__title {
		font-size: 16px;
	}

	.rex-card__text-zh {
		font-size: 14px;
	}

	.rex-card__text-en {
		font-size: 12px;
		padding-left: 10px;
	}
}

/* =============================================================================
   預設 Page 模板：/return-and-exchange/ 編輯器（區塊）內容
   body 含 .page-return-and-exchange
   ============================================================================= */

body.page-return-and-exchange .site-main #primary {
	background: linear-gradient(180deg, rgba(3, 76, 140, 0.04) 0%, var(--bg-color, #f5f5f5) 180px, var(--bg-color, #f5f5f5) 100%);
	padding-bottom: 48px;
}

body.page-return-and-exchange .site-main .page-container .page-content {
	max-width: 880px;
	margin-left: auto;
	margin-right: auto;
	padding-top: 28px;
	padding-bottom: 48px;
}

/* Hide empty list blocks left by the editor */
body.page-return-and-exchange .page-content ul.wp-block-list:has(> li:only-child:empty),
body.page-return-and-exchange .page-content ul.wp-block-list:empty {
	display: none;
}

/* Each list group: card + left accent bar */
body.page-return-and-exchange .page-content ul.wp-block-list:not(:has(> li:only-child:empty)) {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	background: var(--white, #fff);
	border: 1px solid var(--border-color, #d2d2d2);
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(3, 76, 140, 0.07);
	overflow: hidden;
}

body.page-return-and-exchange .page-content ul.wp-block-list:not(:has(> li:only-child:empty)) > li {
	position: relative;
	margin: 0;
	padding: 18px 20px 18px 24px;
	border-bottom: 1px solid rgba(210, 210, 210, 0.65);
	font-size: 15px;
	line-height: 1.65;
	color: var(--text-dark, #333);
	box-shadow: inset 4px 0 0 var(--accent-color, #034c8c);
}

body.page-return-and-exchange .page-content ul.wp-block-list:not(:has(> li:only-child:empty)) > li:last-child {
	border-bottom: none;
}

/* EN/ZH mixed: slight separation for English runs */
body.page-return-and-exchange .page-content ul.wp-block-list > li br + br {
	display: none;
}

body.page-return-and-exchange .page-content ul.wp-block-list > li {
	word-break: break-word;
}

/* Optional subtle hover on cards */
@media (hover: hover) {
	body.page-return-and-exchange .page-content ul.wp-block-list:not(:has(> li:only-child:empty)) > li:hover {
		background: rgba(255, 170, 1, 0.04);
	}
}

/* First item: brand orange; others: theme blue; single item: blue */
body.page-return-and-exchange .page-content ul.wp-block-list:not(:has(> li:only-child:empty)) > li:first-child {
	box-shadow: inset 4px 0 0 var(--primary-color, #ffaa01);
}
body.page-return-and-exchange .page-content ul.wp-block-list:not(:has(> li:only-child:empty)) > li:not(:first-child) {
	box-shadow: inset 4px 0 0 var(--accent-color, #034c8c);
}
body.page-return-and-exchange .page-content ul.wp-block-list:not(:has(> li:only-child:empty)) > li:only-child {
	box-shadow: inset 4px 0 0 var(--accent-color, #034c8c);
}

@media (max-width: 768px) {
	body.page-return-and-exchange .site-main .page-container .page-content {
		padding-left: 16px;
		padding-right: 16px;
	}

	body.page-return-and-exchange .page-content ul.wp-block-list:not(:has(> li:only-child:empty)) > li {
		padding: 14px 14px 14px 18px;
		font-size: 14px;
	}
}
