@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
	--products-ink: #1d2b24;
	--products-muted: #68746d;
	--products-green: #2e8b57;
	--products-green-dark: #1f6d42;
	--products-cream: #f7f3ee;
	--products-line: #e8e4dc;
	--products-shadow: 0 18px 45px rgba(36, 54, 44, 0.09);
}

.products-page {
	min-height: 65vh;
	padding: 58px 0 80px;
	background:
		radial-gradient(circle at 95% 4%, rgba(193, 218, 188, 0.36), transparent 28rem),
		linear-gradient(180deg, #fbfaf8 0%, var(--products-cream) 100%);
	color: var(--products-ink);
	font-family: 'DM Sans', sans-serif;
}

.products-intro {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 32px;
	margin-bottom: 42px;
}

.products-intro .eyebrow {
	display: inline-flex;
	align-items: center;
	margin-bottom: 12px;
	color: var(--products-green);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.products-intro h1 {
	max-width: 650px;
	margin: 0;
	font-family: 'Playfair Display', Georgia, serif;
	font-size: clamp(2.2rem, 4vw, 4rem);
	line-height: 1.08;
}

.products-intro p {
	margin: 14px 0 0;
	color: var(--products-muted);
	font-size: 1.05rem;
}

.products-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	padding: 13px 17px;
	border: 1px solid var(--products-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.7);
	color: var(--products-muted);
	font-size: 0.85rem;
}

.products-meta i {
	color: var(--products-green);
	font-size: 1.1rem;
}

.products-meta strong {
	color: var(--products-ink);
}

.product-card {
	overflow: hidden;
	border: 1px solid var(--products-line) !important;
	border-radius: 18px !important;
	background: rgba(255, 255, 255, 0.88);
	box-shadow: 0 6px 18px rgba(36, 54, 44, 0.04);
	transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.product-card:hover {
	border-color: rgba(46, 139, 87, 0.35) !important;
	box-shadow: var(--products-shadow);
	transform: translateY(-6px);
}

.product-image-wrap {
	overflow: hidden;
	border-radius: 13px;
	background: #ffffff;
}

.product-image {
	width: 100%;
	height: 245px;
	object-fit: contain;
	object-position: center;
	border-radius: 13px !important;
	background: #ffffff !important;
	transition: transform 300ms ease;
}

.product-card:hover .product-image {
	transform: scale(1.05);
}

.discount-tag {
	border-radius: 999px;
	background: var(--products-green) !important;
	font-weight: 700;
}

.brand-name {
	color: var(--products-green) !important;
	font-size: 0.72rem !important;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.product-body h3 {
	margin: 6px 0 10px;
	color: var(--products-ink);
	font-weight: 700;
}

.stars {
	color: #e2a631 !important;
}

.price-row strong {
	color: var(--products-green-dark) !important;
	font-size: 1.25rem;
}

.product-card .btn-primary {
	border: 0;
	border-radius: 10px;
	background: var(--products-green);
	padding: 11px 14px;
	font-weight: 700;
	transition: background 180ms ease, transform 180ms ease;
}

.product-card .btn-primary:hover {
	background: var(--products-green-dark);
	transform: translateY(-1px);
}

.cart-controls {
	min-width: 0;
}

.cart-controls input {
	flex: 0 0 72px;
	width: 72px;
}

.cart-controls .add-cart {
	min-width: 0;
}

.products-page .pagination .page-link {
	border-color: var(--products-line);
	color: var(--products-green-dark);
	background: rgba(255, 255, 255, 0.75);
}

.products-page .pagination .active .page-link {
	border-color: var(--products-green);
	background: var(--products-green);
	color: #fff;
}

.product-detail-page {
	min-height: 65vh;
	padding: 58px 0 80px;
	background: linear-gradient(180deg, #fbfaf8 0%, var(--products-cream) 100%);
	color: var(--products-ink);
	font-family: 'DM Sans', sans-serif;
}

.product-detail-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
	gap: clamp(32px, 7vw, 90px);
	align-items: center;
	padding: clamp(24px, 5vw, 64px);
	border: 1px solid var(--products-line);
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.86);
	box-shadow: var(--products-shadow);
}

.product-detail-image-wrap {
	position: relative;
	min-height: 420px;
	overflow: hidden;
	isolation: isolate;
	contain: paint;
	clip-path: inset(0 round 16px);
	cursor: zoom-in;
	/* border: 1px solid var(--products-line); */
	border-radius: 16px;
	background: #ffffff;
}

.product-detail-image {
	display: block;
	width: 100%;
	height: 420px;
	object-fit: contain;
	padding: 28px;
	background: #ffffff;
	transition: transform 120ms ease-out;
}

.product-detail-discount {
	position: absolute;
	top: 18px;
	right: 18px;
	z-index: 2;
}

.product-detail-content h1 {
	margin: 8px 0 8px;
	font-family: 'Playfair Display', Georgia, serif;
	font-size: clamp(2.2rem, 4vw, 3.8rem);
	line-height: 1.08;
}

.product-reference {
	margin-bottom: 0;
	color: var(--products-muted);
	font-size: 0.9rem;
}

.product-detail-prices {
	display: flex;
	align-items: baseline;
	gap: 14px;
	margin-bottom: 30px;
}

.product-detail-prices strong {
	color: var(--products-green-dark);
	font-size: 2rem;
}

.product-detail-prices span {
	color: var(--products-muted);
	text-decoration: line-through;
}

.product-description {
	margin-bottom: 24px;
	padding-top: 22px;
	border-top: 1px solid var(--products-line);
}

.product-description h2 {
	margin-bottom: 10px;
	font-size: 1.1rem;
}

.product-description p {
	margin-bottom: 0;
	color: var(--products-muted);
	line-height: 1.7;
}

.product-detail-cart-form .quantity-input {
	max-width: 94px;
}

.product-detail-cart-form .btn-primary {
	border: 0;
	border-radius: 10px;
	background: var(--products-green);
	font-weight: 700;
}

.related-products-section {
	margin-top: 56px;
}

.related-products-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 22px;
}

.related-products-heading h2 {
	margin: 0;
	font-size: clamp(1.35rem, 2.5vw, 1.8rem);
	font-weight: 700;
}

.related-products-controls {
	display: flex;
	flex: 0 0 auto;
	gap: 8px;
}

.related-products-arrow {
	display: grid;
	width: 42px;
	height: 42px;
	place-items: center;
	border: 1px solid var(--products-ink);
	border-radius: 50%;
	background: transparent;
	color: var(--products-ink);
	font-size: 1rem;
}

.related-products-arrow:hover {
	background: var(--products-ink);
	color: #fff;
}

.related-products-track {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	padding: 2px 2px 14px;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}

.related-product-card {
	position: relative;
	display: flex;
	flex: 0 0 calc((100% - 60px) / 4);
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--products-line);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 4px 14px rgba(36, 54, 44, 0.06);
	scroll-snap-align: start;
}

.related-product-image {
	position: relative;
	display: block;
	height: 220px;
	padding: 16px;
	background: #fff;
}

.related-product-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.related-product-discount {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 5px 9px;
	border-radius: 4px;
	background: var(--products-green);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
}

.related-product-content {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 12px 14px 14px;
}

.related-product-content h3 {
	display: -webkit-box;
	min-height: 2.8em;
	margin: 0 0 8px;
	overflow: hidden;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.related-product-content h3 a {
	color: inherit;
	text-decoration: none;
}

.related-product-prices {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 12px;
}

.related-product-prices strong {
	color: var(--products-green-dark);
	font-size: 1.15rem;
}

.related-product-prices span {
	color: var(--products-muted);
	font-size: 0.82rem;
	text-decoration: line-through;
}

.related-product-add {
	width: 100%;
	min-height: 38px;
	border: 1px solid var(--products-green-dark);
	border-radius: 6px;
	background: #fff;
	color: var(--products-green-dark);
	font-weight: 600;
}

.related-product-add:hover:not(:disabled) {
	background: var(--products-green-dark);
	color: #fff;
}

.related-product-add:disabled {
	border-color: var(--products-line);
	color: var(--products-muted);
}

@media (max-width: 991.98px) {
	.related-product-card {
		flex-basis: calc((100% - 40px) / 3);
	}
}

@media (max-width: 767.98px) {
	.related-products-section {
		margin-top: 40px;
	}

	.related-products-heading {
		align-items: flex-start;
	}

	.related-product-card {
		flex-basis: calc((100% - 20px) / 2);
	}

	.related-product-image {
		height: 190px;
	}
}

@media (max-width: 479.98px) {
	.related-products-heading h2 {
		max-width: 230px;
	}

	.related-product-card {
		flex-basis: 78%;
	}
}

.product-comments {
	margin-top: 56px;
	border-radius: 22px !important;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: var(--products-shadow) !important;
}

.product-comments-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 24px;
}

.product-comments-head h2 {
	margin: 0;
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.6rem;
}

.product-comments-summary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--products-cream);
	color: var(--products-green-dark);
	font-weight: 700;
}

.product-comments-summary i {
	color: #f5a623;
}

.product-comments-count {
	color: var(--products-muted);
	font-weight: 500;
}

.product-comments-alert {
	margin-bottom: 20px;
	padding: 12px 16px;
	border: 1px solid #f2c1c1;
	border-radius: 12px;
	background: #fdf2f2;
	color: #b23434;
}

.comment-login-cta {
	margin-bottom: 28px;
	padding: 16px 18px;
	border: 1px dashed var(--products-line);
	border-radius: 14px;
	background: var(--products-cream);
	color: var(--products-muted);
}

.comment-login-cta a {
	color: var(--products-green-dark);
	font-weight: 700;
	text-decoration: none;
}

.comment-form-card {
	margin-bottom: 32px;
	padding: 22px;
	border-radius: 16px !important;
	background: var(--products-cream);
}

.comment-form-label {
	display: block;
	margin-bottom: 8px;
	color: var(--products-ink);
	font-weight: 700;
	font-size: 0.9rem;
}

.comment-form-rating {
	margin-bottom: 18px;
}

.star-rating {
	position: relative;
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	padding: 14px 18px;
	border: 1px solid var(--products-line);
	border-radius: 14px;
	background: #fff;
}

.star-rating input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.star-rating label {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	cursor: pointer;
	color: #d8d4c9;
	font-size: 1.9rem;
	line-height: 1;
	transition: color 150ms ease, transform 150ms ease;
}

.star-rating-num {
	color: var(--products-muted);
	font-size: 0.68rem;
	font-weight: 700;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
	color: #f5a623;
}

.star-rating label:hover .star-rating-num,
.star-rating label:hover ~ label .star-rating-num,
.star-rating input:checked ~ label .star-rating-num {
	color: #c9820f;
}

.star-rating input:checked + label {
	transform: scale(1.15);
}

.star-rating-text {
	margin-left: 14px;
	padding-left: 14px;
	border-left: 1px solid var(--products-line);
	color: var(--products-muted);
	font-weight: 700;
	font-size: 0.95rem;
}

.star-rating-value {
	display: none;
	color: var(--products-green-dark);
}

.star-rating #nota5:checked ~ .star-rating-text .star-rating-value-5,
.star-rating #nota4:checked ~ .star-rating-text .star-rating-value-4,
.star-rating #nota3:checked ~ .star-rating-text .star-rating-value-3,
.star-rating #nota2:checked ~ .star-rating-text .star-rating-value-2,
.star-rating #nota1:checked ~ .star-rating-text .star-rating-value-1 {
	display: inline;
}

.star-rating:has(input:checked) .star-rating-placeholder {
	display: none;
}

.comment-form-textarea {
	margin-bottom: 18px;
}

.comment-form-submit {
	border: 0;
	border-radius: 10px;
	background: var(--products-green);
	font-weight: 700;
}

.comment-empty {
	padding: 20px;
	border: 1px dashed var(--products-line);
	border-radius: 14px;
	color: var(--products-muted);
	text-align: center;
}

.product-comment-list {
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin: 0;
	padding: 0;
}

.comment-item {
	display: flex;
	gap: 16px;
	padding: 18px;
	border-radius: 14px !important;
	background: #fff;
	box-shadow: 0 3px 12px rgba(36, 54, 44, 0.05);
	transition: box-shadow 200ms ease, transform 200ms ease;
}

.comment-item:hover {
	box-shadow: 0 10px 24px rgba(36, 54, 44, 0.1);
	transform: translateY(-2px);
}

.comment-avatar {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: linear-gradient(145deg, var(--products-green), var(--products-green-dark));
	color: #fff;
	font-weight: 700;
}

.comment-body {
	flex: 1;
	min-width: 0;
}

.comment-item-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 6px;
}

.comment-item-head strong {
	color: var(--products-ink);
}

.comment-stars {
	color: #f5a623;
	font-size: 0.85rem;
}

.comment-text {
	margin: 0 0 8px;
	color: var(--products-muted);
	line-height: 1.6;
}

.comment-date {
	color: #9aa39b;
	font-size: 0.8rem;
}

@media (max-width: 767.98px) {
	.products-page {
		padding: 38px 0 56px;
	}

	.products-intro {
		align-items: start;
		flex-direction: column;
		gap: 20px;
		margin-bottom: 30px;
	}

	.products-intro h1 {
		font-size: 2.35rem;
	}

	.products-meta {
		align-self: stretch;
		justify-content: center;
	}

	.product-image {
		height: 210px;
	}

	.product-detail-page {
		padding: 38px 0 56px;
	}

	.product-detail-card {
		grid-template-columns: 1fr;
		gap: 30px;
		padding: 18px;
	}

	.product-detail-image-wrap,
	.product-detail-image {
		min-height: 300px;
		height: 300px;
	}
}
