/*!
 * FungiPEX frontend styles.
 *
 * Tokens below map to the ACTIVE Umberto child/parent theme (scheme_original),
 * verified from rendered computed styles on the staging storefront:
 *   heading  #54433a  (theme h1/h2, Signika Negative 600)
 *   text     #7e7e73  (theme paragraph colour)
 *   muted    #767676  (theme breadcrumb/meta)
 *   accent   #ba360a  (theme link/button/price/rating colour)
 *   hover    #e65423  (theme accent hover)
 *   borders  #ebede6 / #d5d5cf
 *   surfaces #ffffff / #f7f7f7 / #f0f0f0
 *   star     #ba360a  (theme WooCommerce rating colour)
 */

.fungipex-section,
.fungipex-lightbox {
	--fp-ground: #f7f7f7;
	--fp-panel: #ffffff;
	--fp-field: #f0f0f0;
	--fp-ink: #54433a;
	--fp-ink-soft: #7e7e73;
	--fp-ink-mute: #767676;
	--fp-heading: #54433a;
	--fp-heading-strong: #3f332c;
	--fp-accent: #ba360a;
	--fp-accent-hover: #e65423;
	--fp-accent-soft: rgba(186, 54, 10, 0.08);
	--fp-line: #ebede6;
	--fp-line-strong: #d5d5cf;
	--fp-star: #ba360a;
	--fp-star-empty: #daddd2;
	--fp-radius: 8px;
	--fp-radius-sm: 6px;
	--fp-shadow: 0 1px 2px rgba(84, 67, 58, 0.05), 0 14px 28px -24px rgba(84, 67, 58, 0.30);
}

.fungipex-section {
	box-sizing: border-box;
	clear: both;
	width: 100%;
	color: var(--fp-ink);
	font-family: "Catamaran", sans-serif;
	margin: 40px 0;
}
.fungipex-section *,
.fungipex-section *::before,
.fungipex-section *::after,
.fungipex-lightbox * {
	box-sizing: border-box;
}

/* Section head ------------------------------------------------------- */
.fungipex-section__head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px 16px;
	width: 100%;
	margin: 0 0 22px;
}
/* Matches the theme's product-page section heading (h2): Signika Negative,
 * uppercase, #54433a. No decorative underline — hierarchy comes from type. */
.fungipex-section__title {
	font-family: "Signika Negative", sans-serif;
	font-size: 1.15rem;
	line-height: 1.3;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--fp-heading);
	margin: 0;
	letter-spacing: 0.01em;
}
.fungipex-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--fp-accent-soft);
	color: var(--fp-accent);
	border: 1px solid rgba(186, 54, 10, 0.22);
	border-radius: 999px;
	padding: 5px 12px;
	font-size: 0.74rem;
	font-weight: 600;
	line-height: 1.4;
}

/* Najvažnije cards --------------------------------------------------- */
.fungipex-cards {
	list-style: none;
	display: grid;
	width: 100%;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
}
.fungipex-card {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: var(--fp-panel);
	border: 1px solid var(--fp-line);
	border-radius: var(--fp-radius);
	padding: 22px 20px 24px;
	box-shadow: var(--fp-shadow);
}
.fungipex-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: var(--fp-radius);
	background: var(--fp-field);
	color: var(--fp-accent);
	margin-bottom: 4px;
}
.fungipex-card__icon svg {
	width: 22px;
	height: 22px;
}
.fungipex-card__title {
	font-family: "Signika Negative", sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--fp-heading);
}
.fungipex-card__value {
	font-family: "Signika Negative", sans-serif;
	font-size: 1.25rem;
	line-height: 1.25;
	font-weight: 600;
	color: var(--fp-ink);
	overflow-wrap: anywhere;
}
.fungipex-card__text {
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--fp-ink-soft);
	margin-top: auto;
}

/* Detaljne informacije ---------------------------------------------- */
.fungipex-accordion {
	border-top: 1px solid var(--fp-line-strong);
}
.fungipex-acc__item {
	border-bottom: 1px solid var(--fp-line-strong);
}
.fungipex-acc__heading {
	margin: 0;
}
.fungipex-acc__trigger {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 18px 6px;
	background: none;
	border: 0;
	text-align: left;
	cursor: pointer;
	color: var(--fp-heading);
	font-family: "Signika Negative", sans-serif;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	text-transform: none;
}
.fungipex-acc__trigger:hover {
	color: var(--fp-accent);
}
.fungipex-acc__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	border-radius: var(--fp-radius-sm);
	background: var(--fp-field);
	color: var(--fp-accent);
}
.fungipex-acc__icon svg {
	width: 19px;
	height: 19px;
}
.fungipex-acc__title {
	flex: 1 1 auto;
}
.fungipex-acc__chevron {
	display: inline-flex;
	color: var(--fp-ink-mute);
	transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.fungipex-acc__item.is-open .fungipex-acc__chevron {
	transform: rotate(180deg);
	color: var(--fp-accent);
}
.fungipex-acc__panel {
	overflow: hidden;
	transition: height 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.fungipex-acc__content {
	padding: 0 6px 24px 54px;
	color: var(--fp-ink-soft);
	font-size: 0.96rem;
	line-height: 1.7;
}
.fungipex-acc__content > *:first-child { margin-top: 0; }
.fungipex-acc__content > *:last-child { margin-bottom: 0; }
.fungipex-acc__content a {
	color: var(--fp-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.fungipex-acc__content a:hover {
	color: var(--fp-accent-hover);
}
.fungipex-acc__content h3,
.fungipex-acc__content h4 {
	font-family: "Signika Negative", sans-serif;
	color: var(--fp-heading);
	margin: 18px 0 8px;
	font-size: 1rem;
}
.fungipex-acc__content ul,
.fungipex-acc__content ol {
	padding-left: 20px;
}
.fungipex-faq-item {
	border: 0;
	padding: 6px 0;
}
.fungipex-faq-item summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--fp-heading);
	padding: 6px 0;
}
.fungipex-faq-item .fungipex-faq-answer {
	padding: 4px 0 10px;
}

/* Reviews ----------------------------------------------------------- */
.fungipex-reviews__summary {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 24px 40px;
	align-items: center;
	padding: 22px 24px;
	background: var(--fp-ground);
	border: 1px solid var(--fp-line);
	border-radius: var(--fp-radius);
	margin-bottom: 8px;
}
.fungipex-summary__score {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 140px;
}
.fungipex-summary__number {
	font-family: "Signika Negative", sans-serif;
	font-size: 2.3rem;
	font-weight: 600;
	line-height: 1;
	color: var(--fp-heading);
}
.fungipex-summary__count {
	font-size: 0.86rem;
	color: var(--fp-ink-soft);
}
.fungipex-stars {
	display: inline-flex;
	gap: 2px;
	color: var(--fp-star-empty);
}
.fungipex-star {
	fill: var(--fp-star-empty);
}
.fungipex-star.is-filled {
	fill: var(--fp-star);
}
.fungipex-summary__bars {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 7px;
}
.fungipex-summary__bar {
	display: grid;
	grid-template-columns: 34px 1fr 42px;
	align-items: center;
	gap: 12px;
	font-size: 0.8rem;
	color: var(--fp-ink-soft);
}
.fungipex-summary__bar-label { text-align: right; }
.fungipex-summary__bar-track {
	height: 8px;
	background: var(--fp-field);
	border-radius: 999px;
	overflow: hidden;
}
.fungipex-summary__bar-fill {
	display: block;
	height: 100%;
	background: var(--fp-star);
	border-radius: 999px;
}
.fungipex-summary__bar-count { text-align: right; }

.fungipex-review-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.fungipex-review {
	padding: 22px 0;
	border-bottom: 1px solid var(--fp-line);
}
.fungipex-review__head {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	margin-bottom: 10px;
}
.fungipex-review__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	border-radius: 50%;
	background: var(--fp-field);
	color: var(--fp-heading);
	font-weight: 700;
	font-size: 1.05rem;
}
.fungipex-review__author {
	display: block;
	font-weight: 600;
	color: var(--fp-heading);
}
.fungipex-review__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	font-size: 0.8rem;
	color: var(--fp-ink-mute);
	margin-top: 3px;
}
.fungipex-review__verified {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--fp-accent);
	font-weight: 600;
}
.fungipex-review__text {
	color: var(--fp-ink-soft);
	line-height: 1.7;
	font-size: 0.96rem;
}
.fungipex-review__text > *:first-child { margin-top: 0; }
.fungipex-review__photos {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}
.fungipex-photo {
	padding: 0;
	border: 1px solid var(--fp-line-strong);
	border-radius: var(--fp-radius-sm);
	background: #fff;
	overflow: hidden;
	cursor: zoom-in;
	width: 88px;
	height: 88px;
	line-height: 0;
}
.fungipex-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.fungipex-photo:hover img { transform: scale(1.05); }

.fungipex-reviews__empty {
	color: var(--fp-ink-soft);
	padding: 8px 0 4px;
}
.fungipex-reviews__more {
	margin: 18px 0 8px;
}
.fungipex-reviews__nomore {
	color: var(--fp-ink-mute);
	font-size: 0.86rem;
}

/* Buttons — match the theme's control (accent background, #fff text, 6px
 * radius, Signika Negative, uppercase). ---------------------------------- */
.fungipex-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 12px 22px;
	border-radius: var(--fp-radius-sm);
	font-family: "Signika Negative", sans-serif;
	font-size: 0.9rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	cursor: pointer;
	text-decoration: none;
	border: 1px solid transparent;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.fungipex-button--primary {
	background: var(--fp-accent);
	color: #fff;
}
.fungipex-button--primary:hover {
	background: var(--fp-accent-hover);
	color: #fff;
}
.fungipex-button--ghost {
	background: transparent;
	color: var(--fp-accent);
	border-color: var(--fp-accent);
}
.fungipex-button--ghost:hover {
	background: var(--fp-accent-soft);
	border-color: var(--fp-accent-hover);
	color: var(--fp-accent-hover);
}
.fungipex-button:disabled {
	opacity: 0.6;
	cursor: default;
}
.fungipex-button:focus-visible,
.fungipex-acc__trigger:focus-visible,
.fungipex-photo:focus-visible,
.fungipex-review-form input:focus-visible,
.fungipex-review-form textarea:focus-visible {
	outline: 2px solid var(--fp-accent);
	outline-offset: 2px;
}

/* Review form ------------------------------------------------------- */
.fungipex-review-form__wrap {
	margin-top: 20px;
}
.fungipex-review-form__wrap > summary {
	list-style: none;
	display: inline-flex;
}
.fungipex-review-form__wrap > summary::-webkit-details-marker { display: none; }
.fungipex-review-form {
	margin-top: 20px;
	background: var(--fp-ground);
	border: 1px solid var(--fp-line);
	border-radius: var(--fp-radius);
	padding: 24px;
	max-width: 720px;
}
.fungipex-field {
	margin: 0 0 18px;
}
.fungipex-field > label,
.fungipex-field legend {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--fp-heading);
	margin-bottom: 7px;
}
.fungipex-review-form input[type="text"],
.fungipex-review-form input[type="email"],
.fungipex-review-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--fp-line-strong);
	border-radius: var(--fp-radius-sm);
	background: #fff;
	color: var(--fp-ink);
	font-size: 0.95rem;
}
.fungipex-review-form textarea { min-height: 120px; resize: vertical; }
.fungipex-field__hint {
	font-size: 0.8rem;
	color: var(--fp-ink-mute);
	margin: 7px 0 0;
}
.fungipex-req { color: var(--fp-accent); }
.fungipex-hp {
	position: absolute !important;
	left: -9999px !important;
	height: 0;
	overflow: hidden;
}
.fungipex-rating-input {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 4px;
}
.fungipex-rating-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fungipex-rating-input label {
	cursor: pointer;
	color: var(--fp-star-empty);
	line-height: 0;
}
.fungipex-rating-input label svg { fill: currentColor; }
.fungipex-rating-input input:checked ~ label,
.fungipex-rating-input label:hover,
.fungipex-rating-input label:hover ~ label {
	color: var(--fp-star);
}
.fungipex-rating-input input:focus-visible + label {
	outline: 2px solid var(--fp-accent);
	outline-offset: 2px;
	border-radius: 4px;
}
.fungipex-photo-previews {
	display: flex;
	gap: 10px;
	margin-top: 10px;
}
.fungipex-photo-previews img {
	width: 66px;
	height: 66px;
	object-fit: cover;
	border-radius: var(--fp-radius-sm);
	border: 1px solid var(--fp-line-strong);
}
.fungipex-form__notice:empty { display: none; }
.fungipex-form__notice {
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: var(--fp-radius-sm);
	font-size: 0.9rem;
}
.fungipex-form__notice.is-success {
	background: #eef4ea;
	color: #2c4a24;
	border: 1px solid #cfe0c6;
}
.fungipex-form__notice.is-error {
	background: #fdecea;
	color: #8a2019;
	border: 1px solid #f0c6c1;
}

/* Lightbox ---------------------------------------------------------- */
.fungipex-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(24, 18, 12, 0.88);
	padding: 24px;
}
.fungipex-lightbox[hidden] { display: none; }
.fungipex-lightbox__img {
	max-width: 90vw;
	max-height: 85vh;
	border-radius: var(--fp-radius);
	box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.fungipex-lightbox__close,
.fungipex-lightbox__nav {
	position: absolute;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	width: 46px;
	height: 46px;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.fungipex-lightbox__close { top: 22px; right: 22px; }
.fungipex-lightbox__nav--prev { left: 22px; top: 50%; transform: translateY(-50%); }
.fungipex-lightbox__nav--next { right: 22px; top: 50%; transform: translateY(-50%); }
.fungipex-lightbox__close:hover,
.fungipex-lightbox__nav:hover { background: rgba(255, 255, 255, 0.26); }

/* Responsive -------------------------------------------------------- */
@media (max-width: 900px) {
	.fungipex-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fungipex-reviews__summary { grid-template-columns: 1fr; gap: 18px; }
	.fungipex-acc__content { padding-left: 20px; }
}
@media (max-width: 460px) {
	.fungipex-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fungipex-card { padding: 18px 16px; }
	.fungipex-summary__bar { grid-template-columns: 30px 1fr 32px; gap: 8px; }
}

/* Theme-chrome neutralisation ---------------------------------------
 * The Umberto parent theme styles every <button> via `.scheme_original
 * button` (background, uppercase, padding) and adds hover classes. These
 * scoped rules keep FungiPEX's own controls consistent with the theme. */
.fungipex-section .fungipex-acc__trigger {
	background: transparent !important;
	border: 0;
	color: var(--fp-heading) !important;
	padding: 18px 6px;
	font-family: "Signika Negative", sans-serif;
	text-transform: none;
}
.fungipex-section .fungipex-acc__trigger:hover,
.fungipex-section .fungipex-acc__trigger:focus {
	background: transparent !important;
	color: var(--fp-accent) !important;
}
.fungipex-section .fungipex-button {
	font-family: "Signika Negative", sans-serif;
	text-transform: uppercase;
	border-radius: var(--fp-radius-sm);
}
.fungipex-section .fungipex-button--primary {
	background: var(--fp-accent) !important;
	color: #fff !important;
}
.fungipex-section .fungipex-button--primary:hover,
.fungipex-section .fungipex-button--primary:focus {
	background: var(--fp-accent-hover) !important;
	color: #fff !important;
}
.fungipex-section .fungipex-button--ghost {
	background: transparent !important;
	color: var(--fp-accent) !important;
	border: 1px solid var(--fp-accent);
}
.fungipex-section .fungipex-button--ghost:hover,
.fungipex-section .fungipex-button--ghost:focus {
	background: var(--fp-accent-soft) !important;
	color: var(--fp-accent-hover) !important;
	border-color: var(--fp-accent-hover);
}

/* Photo thumbnails are real <button>s; neutralise theme button chrome and
 * keep a definite square so the lazy image can measure. */
.fungipex-section .fungipex-photo {
	display: inline-block;
	background: #fff !important;
	border: 1px solid var(--fp-line-strong);
	border-radius: var(--fp-radius-sm);
	padding: 0 !important;
	width: 88px !important;
	height: 88px !important;
	min-height: 0 !important;
	overflow: hidden;
	line-height: 0;
	cursor: zoom-in;
}
.fungipex-section .fungipex-photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Lightbox controls */
.fungipex-lightbox .fungipex-lightbox__close,
.fungipex-lightbox .fungipex-lightbox__nav {
	background: rgba(255, 255, 255, 0.14) !important;
	color: #fff !important;
	border: 1px solid rgba(255, 255, 255, 0.3) !important;
	padding: 0;
}
.fungipex-lightbox .fungipex-lightbox__close:hover,
.fungipex-lightbox .fungipex-lightbox__nav:hover {
	background: rgba(255, 255, 255, 0.26) !important;
	color: #fff !important;
}

@media (prefers-reduced-motion: reduce) {
	.fungipex-acc__panel,
	.fungipex-acc__chevron,
	.fungipex-photo img,
	.fungipex-button {
		transition: none !important;
	}
}
