/**
 * Obchod — Frontend CSS.
 * Loaded on /produkty/ (archive) and /produkt/{slug}/ (detail) pages.
 */

/* ----------------------------------------------------------
 * Archive page — Products grid
 * -------------------------------------------------------- */
.wv3-products-archive {
	position: relative;
	padding: 48px 0 var(--wv3-space-section, 96px);
	margin-top: -32px;
	padding-top: 64px;
	background-size: cover;
	background-position: center;
	background-color: var(--wv3-primary-lighter, #eef5f3);
}

.wv3-products-archive__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 100%);
	pointer-events: none;
	opacity: 0;
}

.wv3-products-archive[style*="background-image"] .wv3-products-archive__overlay {
	opacity: 1;
}

.wv3-products-archive .wv3-container {
	position: relative;
	z-index: 1;
}

.wv3-products-archive__header {
	text-align: center;
	margin-bottom: var(--wv3-space-lg, 24px);
}

.wv3-products-archive__title {
	font-family: var(--wv3-font-heading, "Inter", system-ui, sans-serif);
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: var(--wv3-font-weight-heading, 700);
	margin: 0 0 var(--wv3-space-md, 16px);
}

.wv3-products-archive[style*="background-image"] .wv3-products-archive__title {
	color: #fff;
}

.wv3-products-archive__categories {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wv3-space-sm, 8px);
	justify-content: center;
	margin-bottom: var(--wv3-space-xl, 32px);
}

.wv3-products-archive__cat-link {
	display: inline-block;
	padding: 6px 16px;
	border-radius: var(--wv3-radius-md, 8px);
	background: var(--wv3-primary-light, #eef5f3);
	color: var(--wv3-primary, #4F7F74);
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
	transition: background 0.2s, color 0.2s;
}

.wv3-products-archive__cat-link:hover,
.wv3-products-archive__cat-link--active {
	background: var(--wv3-primary, #4F7F74);
	color: #fff;
}

.wv3-products-archive[style*="background-image"] .wv3-products-archive__cat-link {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.wv3-products-archive[style*="background-image"] .wv3-products-archive__cat-link:hover,
.wv3-products-archive[style*="background-image"] .wv3-products-archive__cat-link--active {
	background: rgba(255, 255, 255, 0.9);
	color: var(--wv3-primary, #4F7F74);
}

.wv3-products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: var(--wv3-space-xl, 32px);
}

/* ----------------------------------------------------------
 * Product card
 * -------------------------------------------------------- */
.wv3-product-card {
	background: var(--wv3-bg, #fff);
	border-radius: var(--wv3-radius-md, 8px);
	border: 1px solid var(--wv3-border, #e5e7eb);
	box-shadow: var(--wv3-shadow-sm, 0 2px 8px rgba(0,0,0,0.06));
	overflow: hidden;
	transition: box-shadow 0.25s, transform 0.25s;
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
}

.wv3-product-card:hover {
	box-shadow: var(--wv3-shadow-md, 0 8px 24px rgba(0,0,0,0.1));
	transform: translateY(-2px);
}

.wv3-product-card__image {
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.wv3-product-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wv3-product-card__body {
	padding: var(--wv3-space-lg, 24px);
	display: flex;
	flex-direction: column;
	flex: 1;
}

.wv3-product-card__category {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--wv3-primary, #4F7F74);
	margin-bottom: var(--wv3-space-xs, 4px);
}

.wv3-product-card__name {
	font-family: var(--wv3-font-heading, "Inter", system-ui, sans-serif);
	font-size: 1.125rem;
	font-weight: 600;
	margin: 0 0 var(--wv3-space-sm, 8px);
	line-height: 1.3;
}

.wv3-product-card__desc {
	color: var(--wv3-text-secondary, #6b7280);
	font-size: 0.875rem;
	line-height: 1.5;
	margin-bottom: var(--wv3-space-md, 16px);
	flex: 1;
}

.wv3-product-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
}

.wv3-product-card__price {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--wv3-primary, #4F7F74);
}

.wv3-product-card__cta {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--wv3-primary, #4F7F74);
	text-decoration: none;
}

/* ----------------------------------------------------------
 * Pagination
 * -------------------------------------------------------- */
.wv3-products-pagination {
	display: flex;
	gap: var(--wv3-space-sm, 8px);
	justify-content: center;
	margin-top: var(--wv3-space-xl, 32px);
}

.wv3-products-pagination a,
.wv3-products-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--wv3-radius-md, 8px);
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
}

.wv3-products-pagination a {
	background: var(--wv3-primary-light, #eef5f3);
	color: var(--wv3-primary, #4F7F74);
}

.wv3-products-pagination a:hover {
	background: var(--wv3-primary, #4F7F74);
	color: #fff;
}

.wv3-products-pagination .current {
	background: var(--wv3-primary, #4F7F74);
	color: #fff;
}

/* ----------------------------------------------------------
 * Product detail page
 * -------------------------------------------------------- */
.wv3-product-detail {
	padding: 16px 0 var(--wv3-space-section, 96px);
}

.wv3-product-detail__layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--wv3-space-xl, 32px);
	align-items: start;
}

.wv3-product-detail__gallery {
	border-radius: var(--wv3-radius-md, 8px);
	overflow: hidden;
}

.wv3-product-detail__gallery img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: var(--wv3-radius-md, 8px);
}

.wv3-product-detail__breadcrumb {
	font-size: 0.8125rem;
	color: var(--wv3-text-secondary, #6b7280);
	margin-bottom: var(--wv3-space-md, 16px);
}

.wv3-product-detail__breadcrumb a {
	color: var(--wv3-primary, #4F7F74);
	text-decoration: none;
}

.wv3-product-detail__breadcrumb a:hover {
	text-decoration: underline;
}

.wv3-product-detail__category {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--wv3-primary, #4F7F74);
	margin-bottom: var(--wv3-space-xs, 4px);
}

.wv3-product-detail__title {
	font-family: var(--wv3-font-heading, "Inter", system-ui, sans-serif);
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: var(--wv3-font-weight-heading, 700);
	margin: 0 0 var(--wv3-space-md, 16px);
	line-height: 1.2;
}

.wv3-product-detail__price {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--wv3-primary, #4F7F74);
	margin-bottom: var(--wv3-space-lg, 24px);
}

.wv3-product-detail__stock {
	font-size: 0.875rem;
	margin-bottom: var(--wv3-space-lg, 24px);
}

.wv3-product-detail__stock--available {
	color: #0a6e2e;
}

.wv3-product-detail__stock--low {
	color: #b45309;
}

.wv3-product-detail__description {
	line-height: 1.7;
	margin-bottom: var(--wv3-space-xl, 32px);
}

.wv3-product-detail__description p {
	margin-bottom: var(--wv3-space-md, 16px);
}

/* ----------------------------------------------------------
 * Inquiry form
 * -------------------------------------------------------- */
.wv3-inquiry-form {
	background: var(--wv3-bg-alt, #f9fafb);
	border-radius: var(--wv3-radius-lg, 16px);
	padding: var(--wv3-space-xl, 32px);
	margin-top: var(--wv3-space-xl, 32px);
}

.wv3-inquiry-form__title {
	font-family: var(--wv3-font-heading, "Inter", system-ui, sans-serif);
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0 0 var(--wv3-space-lg, 24px);
}

.wv3-inquiry-form__row {
	margin-bottom: var(--wv3-space-md, 16px);
}

.wv3-inquiry-form__label {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	margin-bottom: var(--wv3-space-xs, 4px);
	color: var(--wv3-text, #1f2937);
}

.wv3-inquiry-form__input,
.wv3-inquiry-form__textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--wv3-border, #e5e7eb);
	border-radius: var(--wv3-radius-md, 8px);
	font-size: 0.9375rem;
	font-family: inherit;
	background: var(--wv3-bg, #fff);
	color: var(--wv3-text, #1f2937);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.wv3-inquiry-form__input:focus,
.wv3-inquiry-form__textarea:focus {
	outline: none;
	border-color: var(--wv3-primary, #4F7F74);
	box-shadow: 0 0 0 3px var(--wv3-primary-light, rgba(79, 127, 116, 0.1));
}

.wv3-inquiry-form__textarea {
	min-height: 100px;
	resize: vertical;
}

.wv3-inquiry-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 28px;
	background: var(--wv3-primary, #4F7F74);
	color: var(--wv3-on-primary, #fff);
	border: none;
	border-radius: var(--wv3-radius-md, 8px);
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
	margin-top: var(--wv3-space-sm, 8px);
}

.wv3-inquiry-form__submit:hover {
	background: var(--wv3-primary-dark, #3d6b62);
}

.wv3-inquiry-form__submit:active {
	transform: scale(0.98);
}

.wv3-inquiry-form__submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.wv3-inquiry-form__message {
	margin-top: var(--wv3-space-md, 16px);
	padding: 12px 16px;
	border-radius: var(--wv3-radius-md, 8px);
	font-size: 0.875rem;
	display: none;
}

.wv3-inquiry-form__message--success {
	display: block;
	background: #d4edda;
	color: #0a6e2e;
}

.wv3-inquiry-form__message--error {
	display: block;
	background: #fde8e8;
	color: #9b1c1c;
}

/* Honeypot — visually hidden */
.wv3-hp-field {
	position: absolute;
	left: -9999px;
	opacity: 0;
	height: 0;
	overflow: hidden;
}

/* ----------------------------------------------------------
 * Short description + full content + specs
 * -------------------------------------------------------- */
.wv3-product-detail__short-desc {
	color: var(--wv3-text-secondary, #4b5563);
	font-size: 1rem;
	line-height: 1.7;
	margin-bottom: var(--wv3-space-lg, 24px);
}

.wv3-product-detail__content {
	margin-top: var(--wv3-space-xl, 32px);
	padding-top: var(--wv3-space-xl, 32px);
	border-top: 1px solid var(--wv3-border, #e5e7eb);
	line-height: 1.8;
	max-width: 66.666%;
}

.wv3-product-detail__content h2 {
	font-family: var(--wv3-font-heading, "Inter", system-ui, sans-serif);
	font-size: clamp(1.25rem, 2.5vw, 1.75rem);
	font-weight: var(--wv3-font-weight-heading, 700);
	margin: var(--wv3-space-xl, 32px) 0 var(--wv3-space-md, 16px);
}

.wv3-product-detail__content h3 {
	font-family: var(--wv3-font-heading, "Inter", system-ui, sans-serif);
	font-size: clamp(1.1rem, 2vw, 1.375rem);
	font-weight: 600;
	margin: var(--wv3-space-lg, 24px) 0 var(--wv3-space-sm, 8px);
}

.wv3-product-detail__content p {
	margin-bottom: var(--wv3-space-md, 16px);
}

.wv3-product-detail__content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--wv3-radius-md, 8px);
	margin: var(--wv3-space-lg, 24px) 0;
}

.wv3-product-detail__specs {
	margin-top: var(--wv3-space-xl, 32px);
	padding-top: var(--wv3-space-xl, 32px);
	border-top: 1px solid var(--wv3-border, #e5e7eb);
}

.wv3-product-detail__specs-title {
	font-family: var(--wv3-font-heading, "Inter", system-ui, sans-serif);
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0 0 var(--wv3-space-md, 16px);
}

.wv3-product-detail__specs-table {
	width: 100%;
	max-width: 600px;
	border-collapse: collapse;
}

.wv3-product-detail__specs-table th,
.wv3-product-detail__specs-table td {
	padding: 10px 16px;
	text-align: left;
	border-bottom: 1px solid var(--wv3-border, #e5e7eb);
	font-size: 0.9375rem;
}

.wv3-product-detail__specs-table th {
	color: var(--wv3-text-secondary, #6b7280);
	font-weight: 500;
	width: 40%;
}

.wv3-product-detail__specs-table td {
	font-weight: 600;
	color: var(--wv3-text, #1f2937);
}

.wv3-product-detail__specs-table tr:last-child th,
.wv3-product-detail__specs-table tr:last-child td {
	border-bottom: none;
}

/* ----------------------------------------------------------
 * Related products on product detail
 * -------------------------------------------------------- */
.wv3-related-products {
	padding: var(--wv3-space-section, 96px) 0;
	background: var(--wv3-bg-alt, #f9fafb);
}

.wv3-related-products .wv3-section__title {
	text-align: center;
	margin-bottom: var(--wv3-space-xl, 32px);
}

/* ----------------------------------------------------------
 * CTA button on product detail
 * -------------------------------------------------------- */
.wv3-product-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 36px;
	background: var(--wv3-primary, #4F7F74);
	color: var(--wv3-on-primary, #fff);
	border: none;
	border-radius: var(--wv3-radius-md, 8px);
	font-size: 1.0625rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.wv3-product-cta:hover {
	background: var(--wv3-primary-dark, #3d6b62);
	box-shadow: 0 6px 20px rgba(0,0,0,0.15);
	transform: translateY(-1px);
}

.wv3-product-cta:active {
	transform: scale(0.98);
}

/* ----------------------------------------------------------
 * Inquiry modal popup
 * -------------------------------------------------------- */
.wv3-inquiry-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s, visibility 0.25s;
}

.wv3-inquiry-modal--open {
	opacity: 1;
	visibility: visible;
}

.wv3-inquiry-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(2px);
}

.wv3-inquiry-modal__dialog {
	position: relative;
	background: var(--wv3-bg, #fff);
	border-radius: var(--wv3-radius-lg, 16px);
	padding: var(--wv3-space-xl, 32px);
	max-width: 500px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 24px 64px rgba(0,0,0,0.2);
	transform: translateY(20px);
	transition: transform 0.25s;
}

.wv3-inquiry-modal--open .wv3-inquiry-modal__dialog {
	transform: translateY(0);
}

.wv3-inquiry-modal__close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--wv3-text-secondary, #6b7280);
	cursor: pointer;
	padding: 4px 8px;
	transition: color 0.2s;
}

.wv3-inquiry-modal__close:hover {
	color: var(--wv3-text, #1f2937);
}

.wv3-inquiry-modal__title {
	font-family: var(--wv3-font-heading, "Inter", system-ui, sans-serif);
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0 0 var(--wv3-space-xs, 4px);
}

.wv3-inquiry-modal__product {
	color: var(--wv3-text-secondary, #6b7280);
	font-size: 0.875rem;
	margin: 0 0 var(--wv3-space-lg, 24px);
}

/* ----------------------------------------------------------
 * Responsive
 * -------------------------------------------------------- */
@media (max-width: 768px) {
	.wv3-product-detail__layout {
		grid-template-columns: 1fr;
	}

	.wv3-products-grid {
		grid-template-columns: 1fr;
	}

	.wv3-products-archive {
		padding: 16px 0 48px;
		margin-top: -16px;
		padding-top: 32px;
	}

	.wv3-product-detail {
		padding: 8px 0 48px;
	}

	.wv3-inquiry-modal__dialog {
		padding: var(--wv3-space-lg, 24px);
		max-height: 85vh;
	}

	.wv3-product-detail__content {
		max-width: 100%;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	.wv3-products-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
