/**
 * Product Information Slide-Out Panel.
 *
 * Styles the two trigger rows on the product summary and the right-side
 * slide-out panel (overlay, header, tabs, content, responsive). Scoped to the
 * konte-pinfo-* class namespace so nothing else on the site is affected.
 */

/* -------------------------------------------------------------------------
 * Wishlist + Share action row (variable products)
 *
 * The wishlist link and the social-share block are wrapped (server-side) in
 * `.konte-pinfo-actions-row` so they sit on a single row. The parent theme
 * stacks them with `margin:6px 0`, which we neutralize within the row.
 * ---------------------------------------------------------------------- */

body.konte-variable-pdp .konte-pinfo-actions-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 24px;
	margin: 6px 0;
}

body.konte-variable-pdp .konte-pinfo-actions-row .add-to-wishlist-button,
body.konte-variable-pdp .konte-pinfo-actions-row .product-share {
	margin: 0 !important;
}

/* -------------------------------------------------------------------------
 * Trigger rows (below the wishlist button)
 * ---------------------------------------------------------------------- */

.konte-pinfo-triggers {
	margin: 1.5em 0 0;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.konte-pinfo-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 16px 2px;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: #1a1a1a;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-align: left;
	text-transform: uppercase;
	line-height: 1.3;
	cursor: pointer;
	transition: color 0.2s ease, opacity 0.2s ease;
}

.konte-pinfo-trigger:hover,
.konte-pinfo-trigger:focus {
	color: #000;
	opacity: 0.7;
	background: none;
}

.konte-pinfo-trigger:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}

.konte-pinfo-trigger__label {
	flex: 1 1 auto;
}

.konte-pinfo-trigger__icon {
	flex: 0 0 auto;
	position: relative;
	width: 12px;
	height: 12px;
	margin-left: 12px;
}

.konte-pinfo-trigger__icon::before,
.konte-pinfo-trigger__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	background: currentColor;
	transform: translate(-50%, -50%);
}

.konte-pinfo-trigger__icon::before {
	width: 12px;
	height: 1px;
}

.konte-pinfo-trigger__icon::after {
	width: 1px;
	height: 12px;
}

/* -------------------------------------------------------------------------
 * Overlay + slide-out panel
 * ---------------------------------------------------------------------- */

.konte-pinfo-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
}

.konte-pinfo-overlay.is-open {
	visibility: visible;
	pointer-events: auto;
}

.konte-pinfo-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.konte-pinfo-overlay.is-open .konte-pinfo-backdrop {
	opacity: 1;
}

.konte-pinfo-panel {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	width: 33.2%;
	max-width: 90vw;
	height: 100%;
	padding: 56px 40px 40px;
	background: #faf7f2;
	box-shadow: -6px 0 30px rgba(0, 0, 0, 0.12);
	transform: translateX(100%);
	transition: transform 0.3s ease;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.konte-pinfo-overlay.is-open .konte-pinfo-panel {
	transform: translateX(0);
}

.konte-pinfo-panel__close {
	position: absolute;
	top: 14px;
	right: 18px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: #1a1a1a;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.konte-pinfo-panel__close:hover {
	opacity: 0.6;
	background: none;
}

.konte-pinfo-panel__close:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}

/* Header */

.konte-pinfo-panel__head {
	margin-bottom: 26px;
}

.konte-pinfo-panel__eyebrow {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #1a1a1a;
}

.konte-pinfo-panel__title {
	margin: 0;
	font-size: 15px;
	font-weight: 400;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #6b6b6b;
}

/* Tabs */

.konte-pinfo-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
	margin-bottom: 24px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.konte-pinfo-tab {
	position: relative;
	margin: 0;
	padding: 0 0 12px;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: #9a9a9a;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-align: left;
	line-height: 1.3;
	cursor: pointer;
	transition: color 0.2s ease;
}

.konte-pinfo-tab::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 100%;
	height: 2px;
	background: #000;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.25s ease;
}

.konte-pinfo-tab:hover {
	color: #555;
	background: none;
}

.konte-pinfo-tab.is-active {
	color: #000;
}

.konte-pinfo-tab.is-active::after {
	transform: scaleX(1);
}

.konte-pinfo-tab:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}

/* Tab content */

.konte-pinfo-body {
	flex: 1 1 auto;
}

.konte-pinfo-tabpanel {
	color: #2a2a2a;
	font-size: 14px;
	line-height: 1.65;
}

/* Cross-fade in when activated (panels without [hidden] are visible). */
.konte-pinfo-tabpanel[hidden] {
	display: none;
}

.konte-pinfo-tabpanel.is-active {
	animation: konte-pinfo-fade 0.3s ease;
}

@keyframes konte-pinfo-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.konte-pinfo-tabpanel h1,
.konte-pinfo-tabpanel h2,
.konte-pinfo-tabpanel h3,
.konte-pinfo-tabpanel h4 {
	margin: 1.4em 0 0.5em;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.konte-pinfo-tabpanel h1:first-child,
.konte-pinfo-tabpanel h2:first-child,
.konte-pinfo-tabpanel h3:first-child,
.konte-pinfo-tabpanel h4:first-child {
	margin-top: 0;
}

.konte-pinfo-tabpanel p {
	margin: 0 0 1em;
}

.konte-pinfo-tabpanel ul,
.konte-pinfo-tabpanel ol {
	margin: 0 0 1em 1.1em;
	padding: 0;
}

.konte-pinfo-tabpanel li {
	margin: 0 0 0.4em;
}

.konte-pinfo-tabpanel a {
	color: #000;
	text-decoration: underline;
}

/* -------------------------------------------------------------------------
 * Body scroll lock
 * ---------------------------------------------------------------------- */

body.konte-pinfo-noscroll {
	overflow: hidden;
}

/* -------------------------------------------------------------------------
 * Responsive
 * ---------------------------------------------------------------------- */

@media (max-width: 600px) {
	.konte-pinfo-panel {
		width: 100%;
		max-width: 100%;
		padding: 56px 24px 32px;
	}
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
	.konte-pinfo-backdrop,
	.konte-pinfo-panel,
	.konte-pinfo-tab::after {
		transition: none;
	}

	.konte-pinfo-tabpanel.is-active {
		animation: none;
	}
}
