/**
 * assets/css/frontend.css
 *
 * Wygląd formularza na stronie produktu. Kolejność sekcji odpowiada
 * kolejności renderowania w includes/frontend.php.
 *
 * @author  Szymon Kempisty
 * @version 2.1.1
 */

/* --- Cena za sztukę ---------------------------------------------------- */

.pack-price {
	font-size: 2.1rem;
	font-weight: 800;
	color: #e2401c;
	margin: 4px 0 18px;
	line-height: 1.15;
}
.pack-price-was {
	font-size: 1.05rem;
	font-weight: 500;
	color: #aaa;
	text-decoration: line-through;
	margin-left: 10px;
	vertical-align: middle;
}
.pack-price-suffix {
	font-size: 0.85rem;
	font-weight: 500;
	color: #888;
	margin-left: 8px;
	vertical-align: middle;
}

/* --- Pasek progów ilościowych ------------------------------------------ */

.pack-tiers { margin-bottom: 20px; }
.pack-tiers-banner {
	background: #f5b301;
	color: #1a1a1a;
	font-weight: 600;
	font-size: 14px;
	padding: 10px 14px;
	border-radius: 6px;
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.pack-tiers-labels {
	display: flex;
	justify-content: space-between;
	margin-bottom: 8px;
	font-size: 13px;
	color: #888;
}
.pack-tiers-label { flex: 1; text-align: left; }
.pack-tiers-label.is-active { color: #1a1a1a; font-weight: 600; }
.pack-tiers-track { display: flex; gap: 6px; }
.pack-tiers-segment {
	flex: 1;
	height: 6px;
	background: #e5e5e5;
	border-radius: 3px;
	overflow: hidden;
}
.pack-tiers-segment.is-active { background: #ede0bd; }
.pack-tiers-fill { width: 0; height: 100%; background: #f5b301; transition: width .2s ease; }
.pack-tiers-message { margin-top: 10px; font-size: 13px; color: #555; min-height: 1.2em; }

/* --- Wspólna karta ------------------------------------------------------ */

.pack-card {
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	padding: 18px 20px;
	margin-bottom: 20px;
}
.pack-card h4 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.pack-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 12px;
	margin-bottom: 12px;
	border-bottom: 1px solid #e5e5e5;
}
.pack-card-header h4 { margin: 0; }

/* --- Rozmiary odzieży --------------------------------------------------- */

.pack-sizes-rows { display: flex; flex-direction: column; gap: 12px; }
.pack-sizes-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.pack-sizes-chip {
	flex: 0 0 90px;
	text-align: center;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 10px 0;
	font-weight: 600;
	background: #fafafa;
}
.pack-sizes-stepper {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex: 1;
}
.pack-sizes-btn {
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 12px;
	background: #f5c451;
	color: #1a1a1a;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background .15s ease;
}
.pack-sizes-btn:hover { background: #f0b52e; }
.pack-sizes-btn:active { background: #e0a520; }
.pack-sizes-input {
	-moz-appearance: textfield;
	appearance: textfield;
	width: 100%;
	max-width: 320px;
	text-align: center;
	padding: 9px 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 15px;
}
.pack-sizes-input::-webkit-outer-spin-button,
.pack-sizes-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pack-sizes-input:focus { outline: none; border-color: #f5b301; }

@media (max-width: 480px) {
	.pack-sizes-chip { flex-basis: 60px; }
}

/* --- Miejsca znakowania ------------------------------------------------- */

.pack-extras { border-color: #3f7fe0; border-width: 1.5px; }
.pack-extras-list { display: flex; flex-direction: column; gap: 10px; }

.pack-extra {
	border: 1px solid #3f7fe0;
	border-radius: 8px;
	padding: 10px 14px;
}
.pack-extra-top {
	display: flex;
	align-items: center;
	gap: 10px;
}
.pack-extra-main {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	cursor: pointer;
	margin: 0;
}
.pack-extra-check {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	accent-color: #3f7fe0;
	margin: 0;
}
.pack-extra-price {
	margin-left: auto;
	font-weight: 600;
	white-space: nowrap;
}

/* Ikonka [i] z podglądem miejsca znakowania */
.pack-extra-hint {
	position: relative;
	display: inline-flex;
	align-items: center;
}
.pack-extra-info {
	display: grid;
	place-content: center;
	width: 20px;
	height: 20px;
	background: #fff;
	outline: 3px solid #f5b301;
	color: #f5b301;
	border-radius: 24px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	cursor: help;
	transition: .2s;
}
.pack-extra-info:hover,
.pack-extra-info:focus { background: #f5b301; color: #fff; outline-color: #f5b301; }
.pack-extra-preview {
	position: absolute;
	top: 50%;
	left: calc(100% + 8px);
	transform: translateY(-50%);
	width: 240px;
	height: 120px;
	object-fit: cover;
	border-radius: 6px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
	pointer-events: none;
	opacity: 0;
	transition: .2s;
	z-index: 5;
}
.pack-extra-info:hover ~ .pack-extra-preview,
.pack-extra-info:focus ~ .pack-extra-preview { opacity: 1; }

@media (max-width: 640px) {
	.pack-extra-preview {
		left: auto;
		right: 0;
		top: calc(100% + 8px);
		transform: none;
	}
}

/* Rozmiary nadruku – widoczne dopiero po zaznaczeniu miejsca */
.pack-extra-sizes {
	display: none;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed #cfe0fb;
}
.pack-extra.is-checked .pack-extra-sizes { display: flex; }
.pack-extra-size {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	background: #f5f8ff;
	border: 1px solid #cfe0fb;
	border-radius: 16px;
	padding: 4px 10px;
	margin: 0;
	cursor: pointer;
}
.pack-extra-size input { margin: 0; }

/* --- Wgrywanie grafiki --------------------------------------------------- */

.pack-upload-header { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.pack-help-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 20px;
	padding: 7px 14px;
	font-size: 13px;
	cursor: pointer;
}
.pack-help-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 15px;
	height: 15px;
	border: 1.5px solid #f5b301;
	border-radius: 50%;
	color: #f5b301;
	font-size: 10px;
	font-weight: 700;
}
.pack-upload-dropzone {
	border: 2px dashed #ddd;
	border-radius: 8px;
	padding: 30px 20px;
	text-align: center;
	color: #888;
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
	transition: border-color .15s ease;
}
.pack-upload-dropzone:hover,
.pack-upload-dropzone:focus { border-color: #3f7fe0; outline: none; }
.pack-upload-dropzone.is-dragover { border-color: #1a1a1a; }
.pack-upload-dropzone.is-busy { opacity: .6; cursor: progress; }
.pack-upload-dropzone.is-done { border-style: solid; border-color: #4caf50; color: #2e7d32; }
.pack-upload-icon { font-size: 26px; display: block; margin-bottom: 8px; }

/* --- Uwagi --------------------------------------------------------------- */

.pack-notes-input {
	width: 100%;
	min-height: 90px;
	padding: 12px 14px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	resize: vertical;
	box-sizing: border-box;
}
.pack-notes-input:focus { outline: none; border-color: #3f7fe0; }

/* --- Podsumowanie -------------------------------------------------------- */

.pack-summary {
	display: none;
	background: #fdf6e3;
	border: 1px solid #f0dfa6;
	border-radius: 8px;
	padding: 18px 20px;
	margin: 20px 0;
}
.pack-summary.is-visible { display: block; }
.pack-summary h4 {
	margin: 0 0 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid #f0dfa6;
}
.pack-summary-line { font-size: 14px; color: #333; padding: 3px 0; }
.pack-summary-discount {
	display: none;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 14px;
}
.pack-summary-discount.is-visible { display: flex; }
.pack-summary-old { font-size: 16px; color: #999; text-decoration: line-through; }
.pack-summary-badge {
	background: #e2401c;
	color: #fff;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .2px;
	padding: 3px 10px;
	border-radius: 20px;
	white-space: nowrap;
}
.pack-summary-total {
	text-align: right;
	margin-top: 4px;
	font-size: 28px;
	font-weight: 700;
}
.pack-summary-suffix {
	font-size: 15px;
	font-weight: 400;
	color: #666;
	margin-left: 4px;
}

/* --- Miejsca na własne dodatki ------------------------------------------- */

.pack-slot:empty { display: none; }
