/* ============================================================
 * RS Beauty Line DR — Doctor Carousel
 * All selectors scoped under .rsbeauty-line-dr-wrap
 * ============================================================ */

/* --- Custom Properties ---------------------------------------- */
.rsbeauty-line-dr-wrap {
	--doctor-ink: #30302f;
	--doctor-muted: #777777;
	--doctor-paper: #fbfbfa;
	--doctor-card: #ffffff;
	--doctor-line: #e5e5e3;
	--doctor-soft-line: #eeeeec;
	--doctor-accent: #b17b62;
	--doctor-serif: "Noto Serif TC", serif;
	--doctor-sans: "DM Sans", "Noto Sans TC", sans-serif;
}

/* --- Scoped Reset --------------------------------------------- */
.rsbeauty-line-dr-wrap *,
.rsbeauty-line-dr-wrap *::before,
.rsbeauty-line-dr-wrap *::after {
	box-sizing: border-box;
}

.rsbeauty-line-dr-wrap button,
.rsbeauty-line-dr-wrap a {
	font: inherit;
}

.rsbeauty-line-dr-wrap button {
	color: inherit;
}

/* --- Section -------------------------------------------------- */
.rsbeauty-line-dr-wrap .doctor-section {
	padding: clamp(2rem, 4vw, 3.5rem) 1.25rem;
	color: var(--doctor-ink);
	font-family: var(--doctor-sans);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.rsbeauty-line-dr-wrap .doctor-shell {
	width: min(100%, 1180px);
	margin: 0 auto;
}

/* --- Heading -------------------------------------------------- */
.rsbeauty-line-dr-wrap .doctor-heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 2rem;
	padding-bottom: clamp(1.35rem, 2.4vw, 2rem);
	border-bottom: 1px solid var(--doctor-line);
}

.rsbeauty-line-dr-wrap .doctor-eyebrow {
	display: block;
	margin-bottom: 0.42rem;
	color: #8f8f8d;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.22em;
	line-height: 1.4;
	text-transform: uppercase;
}

.rsbeauty-line-dr-wrap .doctor-title {
	margin: 0;
	font-family: var(--doctor-serif);
	font-size: clamp(1.55rem, 2.7vw, 2.35rem);
	font-weight: 500;
	letter-spacing: 0.12em;
	line-height: 1.35;
}

.rsbeauty-line-dr-wrap .doctor-heading__link {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	gap: 0.55rem;
	padding-bottom: 0.3rem;
	color: #555553;
	border-bottom: 1px solid #777773;
	font-size: 1rem;
	letter-spacing: 0.06em;
	text-decoration: none;
	transition: color 180ms ease, border-color 180ms ease;
}

.rsbeauty-line-dr-wrap .doctor-heading__link::after {
	content: "↗";
	font-size: 1rem;
	line-height: 1;
	transition: transform 180ms ease;
}

.rsbeauty-line-dr-wrap .doctor-heading__link:hover,
.rsbeauty-line-dr-wrap .doctor-heading__link:focus-visible {
	color: var(--doctor-accent);
	border-color: var(--doctor-accent);
}

.rsbeauty-line-dr-wrap .doctor-heading__link:hover::after,
.rsbeauty-line-dr-wrap .doctor-heading__link:focus-visible::after {
	transform: translate(2px, -2px);
}

/* --- Focus ring ----------------------------------------------- */
.rsbeauty-line-dr-wrap .doctor-heading__link:focus-visible,
.rsbeauty-line-dr-wrap .doctor-card__link:focus-visible,
.rsbeauty-line-dr-wrap .doctor-swiper-button:focus-visible,
.rsbeauty-line-dr-wrap .doctor-swiper-pagination-bullet:focus-visible {
	outline: 2px solid var(--doctor-accent);
	outline-offset: 4px;
}

/* --- Swiper container ----------------------------------------- */
.rsbeauty-line-dr-wrap .doctor-swiper {
	position: relative;
	width: 100%;
	margin-top: clamp(1.7rem, 3.3vw, 3rem);
	overflow: hidden;
}

.rsbeauty-line-dr-wrap .doctor-swiper-wrapper {
	position: relative;
	z-index: 1;
	display: flex;
	width: 100%;
	height: 100%;
	transition-property: transform;
	transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
}

/* --- Slide / Card --------------------------------------------- */
.rsbeauty-line-dr-wrap .doctor-swiper-slide {
	position: relative;
	display: flex;
	flex-shrink: 0;
	width: 100%;
	height: auto;
	min-height: 354px;
	flex-direction: column;
	overflow: hidden;
	background: var(--doctor-card);
	border: 1px solid var(--doctor-line);
	transition-property: transform;
}

.rsbeauty-line-dr-wrap .doctor-card {
	display: flex;
	min-height: 354px;
	flex-direction: column;
	padding: clamp(1rem, 2vw, 1.45rem) clamp(1rem, 2vw, 1.55rem) 0;
}

/* --- Card top: portrait + identity ---------------------------- */
.rsbeauty-line-dr-wrap .doctor-card__top {
	display: flex;
	align-items: flex-start;
	gap: clamp(1rem, 2.3vw, 1.7rem);
}

.rsbeauty-line-dr-wrap .doctor-card__portrait {
	position: relative;
	flex: 0 0 clamp(4.25rem, 8vw, 5.4rem);
	width: clamp(4.25rem, 8vw, 5.4rem);
	height: clamp(5.6rem, 10vw, 7rem);
	overflow: hidden;
	background: #f3f3f1;
}

.rsbeauty-line-dr-wrap .doctor-card__portrait::after {
	position: absolute;
	inset: 0;
	border: 1px solid rgba(0, 0, 0, 0.035);
	content: "";
	pointer-events: none;
}

.rsbeauty-line-dr-wrap .doctor-card__portrait img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	filter: saturate(0.72) sepia(0.05);
}

.rsbeauty-line-dr-wrap .doctor-card__identity {
	min-width: 0;
	padding-top: 0.15rem;
}

.rsbeauty-line-dr-wrap .doctor-card__kicker {
	margin: 0 0 0.48rem;
	color: #8a8a87;
	font-size: 1rem;
	letter-spacing: 0.13em;
	line-height: 1.5;
}

.rsbeauty-line-dr-wrap .doctor-card__name {
	margin: 0;
	font-family: var(--doctor-serif);
	font-size: clamp(1.2rem, 2.1vw, 1.65rem);
	font-weight: 500;
	letter-spacing: 0.11em;
	line-height: 1.45;
}

.rsbeauty-line-dr-wrap .doctor-card__name small {
	font-family: var(--doctor-sans);
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: 0.08em;
}

/* --- Details (treatment tags) --------------------------------- */
.rsbeauty-line-dr-wrap .doctor-card__details {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin-top: 1.45rem;
	color: #73736f;
	font-size: 1rem;
	letter-spacing: 0.04em;
	line-height: 1.6;
}

.rsbeauty-line-dr-wrap .doctor-card__details-label {
	white-space: nowrap;
}

.rsbeauty-line-dr-wrap .doctor-card__details-value {
	padding: 0.16rem 0.55rem;
	border: 1px solid var(--doctor-line);
	color: #777773;
	white-space: nowrap;
}

/* --- Copy (card title + description) -------------------------- */
.rsbeauty-line-dr-wrap .doctor-card__copy {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0.9rem 0 0;
	color: #666662;
	font-size: 1rem;
	letter-spacing: 0.035em;
	line-height: 1.9;
}

.rsbeauty-line-dr-wrap .doctor-card__copy strong {
	display: block;
	color: #464642;
	font-weight: 600;
}

.rsbeauty-line-dr-wrap .doctor-card__description {
	display: block;
}

/* Normalise WYSIWYG output inside description */
.rsbeauty-line-dr-wrap .doctor-card__description p {
	margin: 0;
}

.rsbeauty-line-dr-wrap .doctor-card__description p + p {
	margin-top: 0.35em;
}

/* --- Footer --------------------------------------------------- */
.rsbeauty-line-dr-wrap .doctor-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 3.2rem;
	margin-top: auto;
	border-top: 1px solid var(--doctor-soft-line);
}

.rsbeauty-line-dr-wrap .doctor-card__link {
	display: inline-flex;
	align-items: center;
	color: #6e6e6a;
	font-size: 1rem;
	letter-spacing: 0.06em;
	text-decoration: none;
	white-space: nowrap;
}

.rsbeauty-line-dr-wrap .doctor-card__arrow {
	color: var(--doctor-accent);
	font-size: 1.45rem;
	line-height: 1;
	transition: transform 180ms ease;
}

/* --- Stretched link — whole card clickable -------------------- */
.rsbeauty-line-dr-wrap .doctor-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	cursor: pointer;
}

.rsbeauty-line-dr-wrap .doctor-swiper-slide:hover .doctor-card__arrow {
	transform: translateX(3px);
}

/* --- Controls ------------------------------------------------- */
.rsbeauty-line-dr-wrap .doctor-swiper-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 0.9rem;
}

.rsbeauty-line-dr-wrap .doctor-swiper-buttons {
	display: flex;
	gap: 0.45rem;
}

.rsbeauty-line-dr-wrap .doctor-swiper-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	cursor: pointer;
	background: transparent;
	border: 1px solid var(--doctor-line);
	border-radius: 50%;
	font-size: 1rem;
	line-height: 1;
	transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.rsbeauty-line-dr-wrap .doctor-swiper-button:hover {
	color: var(--doctor-card);
	background: var(--doctor-accent);
	border-color: var(--doctor-accent);
}

/* --- Pagination ----------------------------------------------- */
.rsbeauty-line-dr-wrap .doctor-swiper-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 1.1rem;
}

.rsbeauty-line-dr-wrap .doctor-swiper-pagination-bullet {
	display: block;
	width: 0.38rem;
	height: 0.38rem;
	padding: 0;
	cursor: pointer;
	background: var(--doctor-line);
	border: 0;
	border-radius: 999px;
	opacity: 1;
	transition: width 180ms ease, background-color 180ms ease;
}

.rsbeauty-line-dr-wrap .doctor-swiper-pagination-bullet-active {
	width: 1.4rem;
	background: var(--doctor-accent);
}

.rsbeauty-line-dr-wrap .doctor-swiper-button-disabled {
	cursor: not-allowed;
	opacity: 0.4;
}

/* --- Static mode (no carousel) -------------------------------- */
.rsbeauty-line-dr-wrap .doctor-swiper--static {
	overflow: visible;
}

.rsbeauty-line-dr-wrap .doctor-swiper--static .doctor-swiper-wrapper {
	gap: 24px;
}

.rsbeauty-line-dr-wrap .doctor-swiper--static .doctor-swiper-slide {
	flex: 0 1 calc(50% - 12px);
	width: auto;
}

/* --- Responsive ----------------------------------------------- */
@media (min-width: 768px) {
	.rsbeauty-line-dr-wrap .doctor-swiper-slide {
		min-height: 354px;
	}
}

@media (max-width: 767px) {
	.rsbeauty-line-dr-wrap .doctor-section {
		padding-right: 1rem;
		padding-left: 1rem;
	}

	.rsbeauty-line-dr-wrap .doctor-heading {
		align-items: flex-start;
		flex-direction: column;
		gap: 1.2rem;
	}

	.rsbeauty-line-dr-wrap .doctor-heading__link {
		align-self: flex-end;
	}

	.rsbeauty-line-dr-wrap .doctor-swiper-slide,
	.rsbeauty-line-dr-wrap .doctor-card {
		min-height: 0;
	}

	.rsbeauty-line-dr-wrap .doctor-card {
		padding-top: 1rem;
	}

	.rsbeauty-line-dr-wrap .doctor-card__portrait {
		flex-basis: 4.65rem;
		width: 4.65rem;
		height: 6.1rem;
	}

	.rsbeauty-line-dr-wrap .doctor-card__copy {
		min-height: 8.4rem;
	}

	.rsbeauty-line-dr-wrap .doctor-card__footer {
		min-height: 3.15rem;
	}

	.rsbeauty-line-dr-wrap .doctor-eyebrow,
	.rsbeauty-line-dr-wrap .doctor-heading__link,
	.rsbeauty-line-dr-wrap .doctor-card__kicker,
	.rsbeauty-line-dr-wrap .doctor-card__name small,
	.rsbeauty-line-dr-wrap .doctor-card__details,
	.rsbeauty-line-dr-wrap .doctor-card__copy,
	.rsbeauty-line-dr-wrap .doctor-card__link {
		font-size: 0.9rem;
	}

	.rsbeauty-line-dr-wrap .doctor-heading__link::after {
		font-size: 0.9rem;
	}
}

/* --- Reduced motion ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.rsbeauty-line-dr-wrap *,
	.rsbeauty-line-dr-wrap *::before,
	.rsbeauty-line-dr-wrap *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
