/**
 * phpStudio.net
 * Web Development & Digital Solutions
 *
 * Developed by: Goran Grbić
 * Certified PHP Developer | Full-Stack Web Developer
 *
 * https://phpstudio.net
 * https://artgrbic.net
 *
 * Copyright © 2026 artgGrbic/ phpStudio.net
 * All rights reserved.
 */

.catalog-intro {
	margin-bottom: 32px;
}

.catalog-intro p {
	max-width: 760px;
	font-size: 1.15rem;
}

.catalog-filters {
	display: flex;
	align-items: end;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 36px;
	padding: 24px;
	border: 1px solid var(--border);
	border-radius: 20px;
	background: var(--background);
}

.catalog-field {
	display: grid;
	gap: 8px;
	flex: 1 1 220px;
	min-width: 0;
}

.catalog-field label,
.variant-form label {
	font-weight: 800;
}

.catalog-field input,
.catalog-field select,
.variant-form select,
.product-information input[type="number"] {
	width: 100%;
	min-height: 50px;
	padding: 12px 14px;
	border: 1px solid var(--header);
	border-radius: 12px;
	font: inherit;
	color: var(--text);
	background: var(--surface);
}

.catalog-filters button,
.variant-form button,
.product-information button[type="submit"] {
	min-height: 50px;
	padding: 12px 24px;
	border: 2px solid var(--primary);
	border-radius: 12px;
	background: var(--primary);
	color: var(--background);
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.catalog-filters > a {
	display: inline-flex;
	align-items: center;
	min-height: 50px;
	padding-inline: 8px;
	font-weight: 800;
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(18px, 2.5vw, 32px);
}

.product-card {
	min-width: 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--border);
	border-radius: 22px;
	background: var(--background);
}

.product-photo {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	padding: 24px;
	background: var(--surface);
	text-decoration: none;
	overflow: hidden;
}

.product-photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 220ms ease;
}

@media (hover: hover) {
	.product-photo:hover img {
		transform: scale(1.035);
	}
}

.product-photo-empty {
	border: 1px solid var(--border);
	border-radius: 20px;
}

.product-card-body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1;
}

.product-card h2 {
	margin: 0 0 12px;
	font-size: 1.4rem;
	font-weight: 900;
	line-height: 1.3;
}

.product-card h2 a {
	text-decoration: none;
}

.product-card h2 a:hover {
	text-decoration: underline;
}

.product-card-body p {
	margin: 0 0 16px;
}

.product-card-body .button {
	width: 100%;
	margin-top: auto;
}

.catalog-price {
	color: var(--text);
	font-size: 1.5rem;
	font-weight: 900;
}

.catalog-price del,
.product-pricing del {
	margin-right: 8px;
	font-size: 0.85em;
	font-weight: 600;
}

.availability,
.product-category {
	color: var(--text);
	font-weight: 700;
}

.catalog-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 40px;
}

.product-detail {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(24px, 4vw, 64px);
	margin-top: 24px;
}

.product-gallery {
	min-width: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-content: start;
	gap: 16px;
}

.product-gallery > :first-child {
	grid-column: 1 / -1;
}

.product-gallery img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--border);
	border-radius: 20px;
	background: var(--surface);
}

.product-information {
	min-width: 0;
}

.product-information h1 {
	font-size: clamp(2rem, 3.5vw, 3.5rem);
}

.product-information input[type="number"] {
	margin-bottom: 12px;
}

.product-information button[type="submit"] {
	width: 100%;
}

.variant-form {
	display: grid;
	gap: 12px;
	margin-block: 24px;
}

.product-pricing {
	margin-block: 24px;
}

.sale-label {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 8px;
	background: var(--primary);
	color: var(--background);
	font-weight: 800;
}

.product-description {
	margin-top: 32px;
	padding: clamp(20px, 3vw, 36px);
	border: 1px solid var(--border);
	border-radius: 20px;
	background: var(--background);
}

.plain-text {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.catalog-empty {
	padding-block: 32px;
}

@media (max-width: 1000px) {
	.product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.product-detail {
		grid-template-columns: 1fr;
	}

	.catalog-filters {
		padding: 18px;
	}
}

@media (max-width: 520px) {
	.product-grid {
		grid-template-columns: 1fr;
	}

	.product-card-body {
		padding: 20px;
	}

	.catalog-filters button {
		flex: 1 1 100%;
	}

	.catalog-intro p {
		font-size: 1rem;
	}
}
.catalog-intro h1 {
	font-family: "Nunito", Arial, sans-serif;
	font-weight: 800;
	letter-spacing: -0.025em;
}

.catalog-filters,
.product-card,
.product-card-body,
.product-description {
	background: var(--panel-background);
}

.product-photo,
.product-photo-empty,
.product-gallery img {
	background: var(--panel-background);
}

.catalog-filters,
.product-card,
.product-description {
	border-color: #d4d7ed;
}
/* Tanji naziv i cena proizvoda. */
.product-card h2,
.product-card .catalog-price {
	font-weight: 600;
}

.product-card h2 a,
.product-card h2 a:hover,
.product-card h2 a:focus {
	text-decoration: none;
}

/* I kada je iznos unutar strong oznake. */
.product-card .catalog-price strong {
	font-weight: 600;
}
.product-card h2 {
	font-weight: 700;
}
/* Dostupnost proizvoda sa ikonicom kuce. */
.product-card .availability {
	display: flex;
	align-items: center;
	gap: 9px;
	color: var(--text);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.4;
}

.availability-dog {
	display: block;
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
}

.availability--in-stock .availability-dog {
	color: #27834a;
}

.availability--out-of-stock .availability-dog {
	color: #b85b16;
}
.product-photo img {
	border-radius: 20px;
}
/* Stranica pojedinačnog proizvoda. */
.product-ui-icon {
	display: inline-block;
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	color: #9495c5;
}

.product-back a,
.product-detail-refined .product-category,
.product-detail-refined .availability,
.product-detail-refined .product-sku,
.product-detail-refined label,
.product-description-refined h2 {
	display: flex;
	align-items: center;
	gap: 10px;
}

.product-back a {
	width: fit-content;
	min-height: 44px;
	font-weight: 600;
	text-decoration: none;
}

.product-detail-refined {
	align-items: stretch;
	gap: clamp(20px, 3vw, 44px);
}

/* Visinu slike određuje sadržaj desnog bloka. */
.product-main-visual {
	position: relative;
	min-width: 0;
	min-height: 440px;
	padding: 20px;
	border: 1px solid #d4d7ed;
	border-radius: 24px;
	background: #e9eaf6;
}

.product-main-image,
.product-main-empty {
	position: absolute;
	inset: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 18px;
	background: #ffffff;
}

.product-main-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: inherit;
}

.product-detail-refined .product-information {
	padding: clamp(20px, 2.5vw, 32px);
	border: 1px solid #d4d7ed;
	border-radius: 24px;
	background: #e9eaf6;
	color: #4e5fa4;
}

.product-detail-refined .product-category {
	margin: 0 0 10px;
	font-weight: 600;
}

.product-detail-refined h1 {
	margin: 0 0 16px;
	font-family: "Nunito", Arial, sans-serif;
	font-size: clamp(28px, 3vw, 44px);
	font-weight: 800;
	line-height: 1.15;
	color: #e9609b;
	overflow-wrap: anywhere;
}

.product-detail-refined .product-summary {
	margin-block: 0 18px;
	line-height: 1.6;
}

.product-detail-refined .variant-form {
	margin-block: 18px;
	gap: 10px;
}

.product-detail-refined label {
	font-weight: 700;
}

.product-detail-refined select,
.product-detail-refined input[type="number"] {
	background: #ffffff;
	color: #4e5fa4;
}

.product-detail-refined .product-variant-button {
	background: transparent;
	border: 1px solid #9495c5;
	color: #4e5fa4;
	font-weight: 700;
}

.product-detail-refined .product-selected {
	margin-block: 14px;
	font-size: 0.95rem;
}

.product-detail-refined .product-pricing {
	margin-block: 18px;
	padding-block: 16px;
	border-top: 1px solid #d4d7ed;
	border-bottom: 1px solid #d4d7ed;
}

.product-detail-refined .sale-label {
	margin: 0 0 10px;
	font-size: 0.85rem;
	font-weight: 700;
}

.product-detail-refined .product-regular-price {
	margin: 0 0 8px;
}

.product-detail-refined .catalog-price {
	margin: 0;
	font-size: clamp(24px, 2.5vw, 32px);
	font-weight: 700;
	color: #4e5fa4;
}

.product-detail-refined .availability,
.product-detail-refined .product-sku {
	margin-block: 12px;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.product-detail-refined .product-sku {
	font-size: 0.9rem;
}

.product-buy-row {
	display: grid;
	grid-template-columns: 90px minmax(0, 1fr);
	gap: 12px;
	align-items: stretch;
}

.product-detail-refined .product-buy-row input {
	min-width: 0;
	margin: 0;
}

.product-detail-refined .product-buy-row button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding-inline: 14px;
	font-weight: 700;
}

.product-buy-row button .product-ui-icon {
	color: #fdeef4;
}

.product-detail-refined .product-open-cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 14px;
	border: 1px solid #9495c5;
	border-radius: 12px;
	background: #ffffff;
	color: #4e5fa4;
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
}

.product-detail-refined .product-open-cart:hover {
	background: #fdeef4;
	text-decoration: none;
}

.product-extra-images {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 180px));
	gap: 16px;
	margin-top: 20px;
}

.product-extra-images a {
	display: block;
	padding: 10px;
	border: 1px solid #d4d7ed;
	border-radius: 18px;
	background: #e9eaf6;
}

.product-extra-images img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: contain;
	border-radius: 12px;
	background: #ffffff;
}

.product-description-refined h2 {
	margin-top: 0;
	font-size: 1.4rem;
	font-weight: 700;
	color: #4e5fa4;
}

.product-back a:focus-visible,
.product-main-image:focus-visible,
.product-extra-images a:focus-visible,
.product-open-cart:focus-visible,
.product-detail-refined :is(input, select, button):focus-visible {
	outline: 3px solid #4e5fa4;
	outline-offset: 4px;
}

@media (max-width: 760px) {
	.product-detail-refined {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.product-main-visual {
		min-height: 0;
		height: clamp(280px, 80vw, 460px);
	}

	.product-main-image,
	.product-main-empty {
		inset: 16px;
	}

	.product-detail-refined .product-information {
		padding: 20px;
	}
}

@media (max-width: 380px) {
	.product-buy-row {
		grid-template-columns: 1fr;
	}

	.product-buy-row input[type="number"] {
		max-width: 100px;
	}
}
/* Uvećanje fotografija proizvoda. */
[data-product-lightbox] {
	cursor: zoom-in;
}

html.product-lightbox-open,
html.product-lightbox-open body {
	overflow: hidden;
	overscroll-behavior: none;
}

.product-lightbox {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 16px;
	padding-top: max(16px, env(safe-area-inset-top));
	padding-bottom: max(16px, env(safe-area-inset-bottom));
	padding-left: max(16px, env(safe-area-inset-left));
	padding-right: max(16px, env(safe-area-inset-right));
	border: 0;
	background: transparent;
	color: #4e5fa4;
	box-sizing: border-box;
	overflow: auto;
	overscroll-behavior: contain;
}

.product-lightbox:not([open]) {
	display: none;
}

.product-lightbox[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}

.product-lightbox::backdrop {
	background: rgb(35 30 58 / 82%);
}

.product-lightbox-panel {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: min(100%, 1000px);
	height: 100%;
	max-height: 900px;
	min-height: 0;
	padding: 66px 20px 20px;
	border: 1px solid #d4d7ed;
	border-radius: 24px;
	background: #ffffff;
	box-shadow: 0 20px 70px rgb(0 0 0 / 20%);
	box-sizing: border-box;
}

.product-lightbox-image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	object-fit: contain;
	border-radius: 12px;
}

.product-lightbox-image[hidden],
.product-lightbox-error[hidden] {
	display: none;
}

.product-lightbox .product-lightbox-close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	min-height: 46px;
	padding: 0;
	border: 1px solid #d4d7ed;
	border-radius: 50%;
	background: #fdeef4;
	color: #4e5fa4;
	font: inherit;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
}

.product-lightbox .product-lightbox-close:hover {
	background: #e9eaf6;
}

.product-lightbox-close:focus-visible {
	outline: 3px solid #4e5fa4;
	outline-offset: 3px;
}

.product-lightbox-error {
	max-width: 420px;
	padding: 20px;
	text-align: center;
}

.product-lightbox[open] .product-lightbox-panel {
	animation: product-lightbox-in 200ms ease-out;
}

.product-lightbox.is-closing .product-lightbox-panel {
	animation: product-lightbox-out 160ms ease-in forwards;
}

@keyframes product-lightbox-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes product-lightbox-out {
	to {
		opacity: 0;
		transform: translateY(8px) scale(0.98);
	}
}

@media (max-width: 600px) {
	.product-lightbox-panel {
		padding: 64px 10px 12px;
		border-radius: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.product-lightbox[open] .product-lightbox-panel,
	.product-lightbox.is-closing .product-lightbox-panel {
		animation: none;
	}
}
