/**
 * Reusable UI components.
 */

/* Buttons */
.en-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: var(--en-control-h);
	padding: 0 22px;
	border-radius: var(--en-radius-control);
	border: 1px solid transparent;
	font-size: 14px;
	font-weight: 700;
	line-height: normal;
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.en-btn--primary {
	background: var(--en-color-primary);
	border-color: var(--en-color-primary);
	color: var(--en-color-text);
	box-shadow: var(--en-shadow-primary);
}

.en-btn--primary:hover {
	color: var(--en-color-text);
	filter: brightness(1.05);
}

.en-btn--secondary {
	background: var(--en-color-page);
	border-color: var(--en-color-border-strong);
	color: var(--en-color-text);
}

.en-btn--secondary:hover {
	border-color: var(--en-color-muted);
	color: var(--en-color-text);
}

.en-btn--ghost {
	background: var(--en-color-chip);
	border-color: var(--en-color-border);
	color: var(--en-color-text);
}

.en-btn--block {
	width: 100%;
}

.en-btn--icon {
	width: var(--en-icon-btn);
	height: var(--en-icon-btn);
	min-height: var(--en-icon-btn);
	padding: 0;
	background: transparent;
	border: 1px solid var(--en-color-border);
	border-radius: var(--en-radius-control);
	color: var(--en-color-text);
}

.en-btn--icon:hover {
	border-color: var(--en-color-border-strong);
	color: var(--en-color-text);
}

/* Pills / badges */
.en-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 10px;
	border-radius: var(--en-radius-pill);
	font-family: var(--en-font-mono);
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	line-height: normal;
}

.en-pill--category {
	background: var(--en-color-header);
	border: 1px solid var(--en-color-border-strong);
	color: var(--en-color-muted);
}

.en-pill--purity {
	background: var(--en-color-notice);
	color: var(--en-color-accent);
}

.en-pill--stock {
	background: var(--en-color-stock);
	color: var(--en-color-success);
}

.en-pill--chip {
	background: var(--en-color-chip);
	color: var(--en-color-muted);
}

.en-pill__dot {
	width: 7px;
	height: 7px;
	border-radius: var(--en-radius-pill);
	background: var(--en-color-success);
}

/* Forms */
.en-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}

.en-field__label {
	font-family: var(--en-font-mono);
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--en-color-muted);
}

.en-input,
.en-select,
.woocommerce form .input-text,
.woocommerce form select,
.woocommerce-input-wrapper .input-text {
	width: 100%;
	height: var(--en-control-h);
	padding: 0 15px;
	background: var(--en-color-header);
	border: 1px solid var(--en-color-border-strong);
	border-radius: var(--en-radius-control);
	color: var(--en-color-text);
}

.en-input::placeholder {
	color: var(--en-color-dim);
}

.en-field__hint {
	font-size: 11px;
	line-height: 1.4;
	color: var(--en-color-dim);
}

.en-checkbox {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.en-checkbox input[type="checkbox"] {
	appearance: none;
	width: 20px;
	height: 20px;
	margin: 0;
	flex-shrink: 0;
	background: var(--en-color-header);
	border: 1px solid var(--en-color-border-strong);
	border-radius: var(--en-radius-control);
	position: relative;
}

.en-checkbox input[type="checkbox"]:checked {
	background: var(--en-color-primary);
	border-color: var(--en-color-primary);
}

.en-checkbox input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	inset: 4px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5f8fa' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.en-checkbox__label {
	font-size: 12px;
	line-height: 1.5;
	color: var(--en-color-muted);
}

/* Quantity */
.en-qty {
	display: inline-flex;
	height: var(--en-control-h);
	border: 1px solid var(--en-color-border-strong);
	border-radius: var(--en-radius-control);
	overflow: hidden;
}

.en-qty button,
.en-qty .quantity .minus,
.en-qty .quantity .plus {
	width: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--en-color-text);
	background: transparent;
}

.en-qty .quantity {
	display: flex;
	margin: 0;
}

.en-qty input.qty {
	width: 46px;
	height: 100%;
	border: 0;
	border-left: 1px solid var(--en-color-border-strong);
	border-right: 1px solid var(--en-color-border-strong);
	border-radius: 0;
	background: transparent;
	text-align: center;
	font-family: var(--en-font-mono);
	font-size: 14px;
	-moz-appearance: textfield;
}

.en-qty input.qty::-webkit-outer-spin-button,
.en-qty input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Product card */
.en-product-card {
	display: flex;
	flex-direction: column;
	background: var(--en-color-card);
	border: 1px solid var(--en-color-border);
	border-radius: var(--en-radius-card);
	box-shadow: var(--en-shadow-card);
	overflow: hidden;
	height: 100%;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease;
}

.en-product-card:hover {
	border-color: var(--en-color-border-strong);
	color: inherit;
}

.en-product-card__media {
	position: relative;
	height: 300px;
	background: var(--en-color-page);
	padding: 18px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.en-product-card__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.en-product-card__badges {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	height: 100%;
	align-items: flex-start;
}

.en-product-card__details {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 22px;
}

.en-product-card__title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.en-product-card__title {
	font-size: 20px;
	font-weight: 700;
	line-height: normal;
}

.en-product-card__amount {
	font-family: var(--en-font-mono);
	font-size: 12px;
	color: var(--en-color-accent);
}

.en-product-card__notice {
	font-size: 12px;
	line-height: 1.45;
	color: var(--en-color-dim);
}

.en-product-card__purchase {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.en-product-card__price {
	font-size: 20px;
	font-weight: 700;
}

.en-product-card__add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: var(--en-radius-control);
	background: var(--en-color-primary);
	color: var(--en-color-text);
}

.en-product-card__add:hover {
	color: var(--en-color-text);
	filter: brightness(1.05);
}

/* Resource card */
.en-resource-card {
	display: flex;
	flex-direction: column;
	background: var(--en-color-card);
	border: 1px solid var(--en-color-border);
	border-radius: var(--en-radius-card);
	overflow: hidden;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.en-resource-card:hover {
	color: inherit;
	border-color: var(--en-color-border-strong);
}

.en-resource-card__media {
	height: 210px;
	overflow: hidden;
}

.en-resource-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.en-resource-card__body {
	display: flex;
	flex-direction: column;
	gap: 13px;
	padding: 24px;
}

.en-resource-card__title {
	font-size: 22px;
	font-weight: 700;
}

.en-resource-card__excerpt {
	font-size: 14px;
	line-height: 1.55;
	color: var(--en-color-muted);
}

.en-resource-card__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 700;
	color: var(--en-color-text);
}

/* FAQ */
.en-faq details {
	border-top: 1px solid var(--en-color-border);
	border-bottom: 1px solid var(--en-color-border);
}

.en-faq details + details {
	border-top: 0;
}

.en-faq summary {
	display: flex;
	gap: 22px;
	align-items: flex-start;
	padding: 24px 0;
	cursor: pointer;
	list-style: none;
	font-size: 18px;
	font-weight: 700;
}

.en-faq summary::-webkit-details-marker {
	display: none;
}

.en-faq summary .en-icon--minus {
	display: none;
}

.en-faq details[open] summary .en-icon--plus {
	display: none;
}

.en-faq details[open] summary .en-icon--minus {
	display: block;
}

.en-faq summary .en-icon {
	color: var(--en-color-accent);
	margin-top: 2px;
}

.en-faq__answer {
	padding: 0 0 24px 40px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--en-color-muted);
}

/* Security signals */
.en-security {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 16px;
	border-top: 1px solid var(--en-color-border);
	flex-wrap: wrap;
}

.en-security__item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 11px;
	color: var(--en-color-muted);
}

.en-security__item .en-icon {
	color: var(--en-color-success);
}

/* Notice boxes */
.en-notice {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 18px;
	border-radius: var(--en-radius-panel);
	background: var(--en-color-header);
	border: 1px solid var(--en-color-warning);
	font-size: 12px;
	line-height: 1.5;
	color: var(--en-color-muted);
}

.en-notice--info {
	background: var(--en-color-notice);
	border-color: var(--en-color-notice-border);
}

.en-notice .en-icon {
	color: var(--en-color-warning);
	flex-shrink: 0;
}

/* Section heading */
.en-section-heading {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.en-section-heading__title {
	font-size: 42px;
	font-weight: 700;
	line-height: 1.08;
}

.en-section-heading__desc {
	font-size: 16px;
	line-height: 1.6;
	color: var(--en-color-muted);
}

@media (max-width: 767px) {
	.en-section-heading__title {
		font-size: 32px;
	}
}
