/**
 * Zest Product Single Styles
 *
 * Styles for the single product page template.
 * Depends on frontend.css for variables and base styles.
 *
 * @package BloomStack\Zest
 * @since 1.0.0
 */

/* ==========================================================================
   Hero Section
   ========================================================================== */

.zest-hero {
	position: relative;
	background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 50%, #4C1D95 100%);
	color: var(--zest-bg-white);
	overflow: hidden;
}

.zest-hero::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -20%;
	width: 60%;
	height: 200%;
	background: radial-gradient(ellipse, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
	pointer-events: none;
}

.zest-hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: center;
	max-width: var(--zest-max-width);
	margin: 0 auto;
	padding: 80px 24px;
	min-height: 480px;
}

.zest-hero__content {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.zest-hero__badge {
	align-self: flex-start;
}

.zest-hero__title {
	font-size: 44px;
	font-weight: 800;
	line-height: 1.1;
	color: var(--zest-bg-white);
	margin: 0;
}

.zest-hero__subtitle {
	font-size: 20px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.85);
	margin: 0;
}

.zest-hero__price {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-top: 4px;
}

.zest-hero__price-current {
	font-size: 36px;
	font-weight: 800;
	color: var(--zest-bg-white);
}

.zest-hero__price-from {
	font-size: 16px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.7);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-right: 4px;
}

.zest-hero__price-compare {
	font-size: 20px;
	color: rgba(255, 255, 255, 0.6);
	text-decoration: line-through;
}

.zest-hero__actions {
	display: flex;
	gap: 12px;
	margin-top: 8px;
	flex-wrap: wrap;
}

.zest-hero__image {
	display: flex;
	align-items: center;
	justify-content: center;
}

.zest-hero__image img {
	max-width: 100%;
	height: auto;
	border-radius: var(--zest-radius-lg);
	box-shadow: var(--zest-shadow-lg);
}

/* ==========================================================================
   Sticky Navigation
   ========================================================================== */

.zest-nav {
	position: relative;
	z-index: 100;
	background: var(--zest-bg-white);
	border-bottom: 1px solid var(--zest-border);
	box-shadow: var(--zest-shadow-sm);
}

.zest-nav.is-stuck {
	position: fixed;
	top: var(--zest-header-offset, 0px);
	left: 0;
	width: 100%;
	box-shadow: var(--zest-shadow);
}

/* When WP admin bar is present */
.admin-bar .zest-nav.is-stuck {
	top: calc(var(--zest-header-offset, 0px) + 32px);
}

@media screen and (max-width: 782px) {
	.admin-bar .zest-nav.is-stuck {
		top: calc(var(--zest-header-offset, 0px) + 46px);
	}
}

/* Placeholder to prevent layout jump when nav becomes fixed */
.zest-nav-placeholder {
	display: none;
}

.zest-nav-placeholder.is-active {
	display: block;
}

.zest-nav__inner {
	display: flex;
	align-items: center;
	gap: 0;
	max-width: var(--zest-max-width);
	margin: 0 auto;
	padding: 0 24px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.zest-nav__inner::-webkit-scrollbar {
	display: none;
}

.zest-nav__link {
	flex-shrink: 0;
	display: block;
	padding: 16px 20px;
	font-size: 14px;
	font-weight: 500;
	color: var(--zest-text-light);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: all var(--zest-transition);
	white-space: nowrap;
}

.zest-nav__link:hover {
	color: var(--zest-primary);
	text-decoration: none;
}

.zest-nav__link.is-active {
	color: var(--zest-primary);
	border-bottom-color: var(--zest-primary);
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.zest-features {
	padding: 80px 0;
}

.zest-feature {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 64px;
	align-items: center;
	max-width: var(--zest-max-width);
	margin: 0 auto;
	padding: 40px 24px;
}

.zest-feature:nth-child(even) {
	direction: rtl;
}

.zest-feature:nth-child(even) > * {
	direction: ltr;
}

.zest-feature__content {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.zest-feature__title {
	font-size: 28px;
	font-weight: 700;
	color: var(--zest-text-dark);
	margin: 0;
}

.zest-feature__description {
	font-size: 16px;
	color: var(--zest-text-body);
	line-height: 1.7;
	margin: 0;
}

.zest-feature__image {
	display: flex;
	align-items: center;
	justify-content: center;
}

.zest-feature__image img {
	max-width: 100%;
	height: auto;
	border-radius: var(--zest-radius-lg);
	box-shadow: var(--zest-shadow-md);
}

/* ==========================================================================
   Pricing Section
   ========================================================================== */

.zest-pricing {
	padding: 80px 0;
	background: var(--zest-bg-light);
}

.zest-pricing__inner {
	max-width: var(--zest-max-width);
	margin: 0 auto;
	padding: 0 24px;
}

.zest-pricing__cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 24px;
	max-width: 900px;
	margin: 0 auto;
}

.zest-pricing-card {
	background: var(--zest-bg-white);
	border: 2px solid var(--zest-border);
	border-radius: var(--zest-radius-lg);
	padding: 40px 32px;
	text-align: center;
	transition: all var(--zest-transition-slow);
}

.zest-pricing-card:hover {
	border-color: var(--zest-primary-light);
	box-shadow: var(--zest-shadow-lg);
	transform: translateY(-4px);
}

.zest-pricing-card--featured {
	border-color: var(--zest-primary);
	position: relative;
}

.zest-pricing-card__name {
	font-size: 20px;
	font-weight: 600;
	color: var(--zest-text-dark);
	margin: 0 0 8px 0;
}

.zest-pricing-card__description {
	font-size: 14px;
	color: var(--zest-text-light);
	margin: 0 0 24px 0;
}

.zest-pricing-card__price {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 4px;
	margin-bottom: 8px;
}

.zest-pricing-card__amount {
	font-size: 48px;
	font-weight: 800;
	color: var(--zest-text-dark);
	line-height: 1;
}

.zest-pricing-card__period {
	font-size: 16px;
	color: var(--zest-text-light);
}

.zest-pricing-card__compare {
	font-size: 16px;
	color: var(--zest-text-muted);
	text-decoration: line-through;
	margin-bottom: 24px;
}

.zest-pricing-card__action {
	margin-top: 24px;
}

.zest-pricing-card__action .zest-btn {
	width: 100%;
}

/* Pricing card USP list */
.zest-pricing-card__usps {
	list-style: none;
	padding: 0;
	margin: 24px 0 0;
	text-align: left;
}

.zest-pricing-card__usp {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 8px 0;
	font-size: 15px;
	color: var(--zest-text);
	border-bottom: 1px solid var(--zest-border-light, #f0f0f0);
}

.zest-pricing-card__usp:last-child {
	border-bottom: none;
}

.zest-pricing-card__usp svg {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	color: var(--zest-primary);
	margin-top: 2px;
}

/* Single variant (no cards needed) */
.zest-pricing-single {
	max-width: 480px;
	margin: 0 auto;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.zest-faq {
	padding: 80px 0;
}

.zest-faq__inner {
	max-width: var(--zest-content-width);
	margin: 0 auto;
	padding: 0 24px;
}

.zest-faq__list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.zest-faq-item {
	border-bottom: 1px solid var(--zest-border);
}

.zest-faq-item:first-child {
	border-top: 1px solid var(--zest-border);
}

.zest-faq-item__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	padding: 20px 0;
	font-size: 17px;
	font-weight: 600;
	color: var(--zest-text-dark);
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	font-family: var(--zest-font-body);
	line-height: 1.4;
	transition: color var(--zest-transition);
}

.zest-faq-item__question:hover {
	color: var(--zest-primary);
}

.zest-faq-item__icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--zest-text-light);
	transition: transform var(--zest-transition-slow);
}

.zest-faq-item__icon svg {
	width: 20px;
	height: 20px;
}

.zest-faq-item.is-open .zest-faq-item__icon {
	transform: rotate(180deg);
}

.zest-faq-item__answer {
	max-height: 0;
	overflow: hidden;
	transition: max-height var(--zest-transition-slow), padding var(--zest-transition-slow);
}

.zest-faq-item.is-open .zest-faq-item__answer {
	max-height: 500px;
	padding-bottom: 20px;
}

.zest-faq-item__answer p {
	font-size: 15px;
	color: var(--zest-text-body);
	line-height: 1.7;
	margin: 0;
}

/* ==========================================================================
   Specifications Section
   ========================================================================== */

.zest-specs {
	padding: 80px 0;
	background: var(--zest-bg-light);
}

.zest-specs__inner {
	max-width: var(--zest-max-width);
	margin: 0 auto;
	padding: 0 24px;
}

.zest-specs__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0;
	background: var(--zest-bg-white);
	border: 1px solid var(--zest-border);
	border-radius: var(--zest-radius);
	overflow: hidden;
}

.zest-spec {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 20px 24px;
	border-bottom: 1px solid var(--zest-border-light);
	border-right: 1px solid var(--zest-border-light);
}

.zest-spec:nth-child(2n) {
	border-right: none;
}

.zest-spec:nth-last-child(-n+2) {
	border-bottom: none;
}

.zest-spec__label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--zest-text-light);
}

.zest-spec__value {
	font-size: 15px;
	font-weight: 500;
	color: var(--zest-text-dark);
}

/* ==========================================================================
   Description / Content Section
   ========================================================================== */

.zest-description {
	padding: 80px 0;
}

.zest-description__inner {
	max-width: var(--zest-content-width);
	margin: 0 auto;
	padding: 0 24px;
}

.zest-description__content {
	font-size: 17px;
	line-height: 1.8;
	color: var(--zest-text-body);
}

.zest-description__content h2 {
	font-size: 24px;
	margin: 2em 0 0.5em 0;
}

.zest-description__content h3 {
	font-size: 20px;
	margin: 1.5em 0 0.5em 0;
}

.zest-description__content ul,
.zest-description__content ol {
	padding-left: 1.5em;
	margin: 0 0 1em 0;
}

.zest-description__content li {
	margin-bottom: 0.5em;
}

.zest-description__content a {
	color: var(--zest-primary);
	text-decoration: underline;
}

.zest-description__content a:hover {
	color: var(--zest-primary-hover);
}

.zest-description__content img {
	border-radius: var(--zest-radius);
	margin: 1.5em 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {

	/* Hero */
	.zest-hero__inner {
		grid-template-columns: 1fr;
		padding: 48px 24px;
		min-height: auto;
		text-align: center;
	}

	.zest-hero__badge {
		align-self: center;
	}

	.zest-hero__title {
		font-size: 32px;
	}

	.zest-hero__subtitle {
		font-size: 17px;
	}

	.zest-hero__price {
		justify-content: center;
	}

	.zest-hero__actions {
		justify-content: center;
	}

	.zest-hero__image {
		order: -1;
	}

	.zest-hero__image img {
		max-width: 280px;
	}

	/* Features */
	.zest-feature {
		grid-template-columns: 1fr;
		gap: 32px;
		padding: 32px 24px;
	}

	.zest-feature:nth-child(even) {
		direction: ltr;
	}

	.zest-feature__title {
		font-size: 24px;
	}

	/* Pricing */
	.zest-pricing__cards {
		grid-template-columns: 1fr;
	}

	/* Specs */
	.zest-specs__grid {
		grid-template-columns: 1fr;
	}

	.zest-spec {
		border-right: none;
	}

	.zest-spec:last-child {
		border-bottom: none;
	}

	/* Sections */
	.zest-section {
		padding: 48px 0;
	}

	.zest-features,
	.zest-pricing,
	.zest-faq,
	.zest-specs,
	.zest-description {
		padding: 48px 0;
	}

	.zest-section__title {
		font-size: 26px;
	}

	.zest-section__subtitle {
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.zest-hero__title {
		font-size: 28px;
	}

	.zest-hero__price-current {
		font-size: 28px;
	}

	.zest-btn--large {
		padding: 14px 28px;
		font-size: 16px;
	}

	.zest-pricing-card {
		padding: 28px 20px;
	}

	.zest-pricing-card__amount {
		font-size: 36px;
	}
}

/* ==========================================================================
   Scroll Entrance Animations
   Scoped under body.zest-has-animations — zero effect when disabled.
   ========================================================================== */

/* Initial hidden state for all animated elements */
.zest-has-animations .zest-feature,
.zest-has-animations .zest-pricing,
.zest-has-animations .zest-specs,
.zest-has-animations .zest-faq {
	opacity: 0;
	transition: opacity 0.6s ease, transform 0.6s ease;
	will-change: opacity, transform;
}

/* Fade — opacity only, no transform offset */

/* Fade Up — slide up from 24px below */
.zest-animations-fade-up .zest-feature,
.zest-animations-fade-up .zest-pricing,
.zest-animations-fade-up .zest-specs,
.zest-animations-fade-up .zest-faq {
	transform: translateY(24px);
}

/* Fade Scale — scale up from 95% */
.zest-animations-fade-scale .zest-feature,
.zest-animations-fade-scale .zest-pricing,
.zest-animations-fade-scale .zest-specs,
.zest-animations-fade-scale .zest-faq {
	transform: scale(0.95);
}

/* Visible state — shared for all styles */
.zest-has-animations .zest-animate--visible {
	opacity: 1;
	transform: none;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
	.zest-has-animations .zest-feature,
	.zest-has-animations .zest-pricing,
	.zest-has-animations .zest-specs,
	.zest-has-animations .zest-faq {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
