/* Calculator preț iPhone */
.ipak {
	--ipak-primary: #ffab12;
	--ipak-select: #3d3fc4;
	--ipak-ink: #1d1a33;
	--ipak-muted: #6a6880;
	--ipak-line: #d9d9e0;
	--ipak-soft: #f1f1f6;
	--ipak-bg: #fff;
	--ipak-radius: 10px;
	max-width: 1120px;
	margin: 0 auto;
	color: var(--ipak-ink);
	font-size: 16px;
	line-height: 1.45;
}
.ipak *, .ipak *::before, .ipak *::after { box-sizing: border-box; }
.ipak [hidden] { display: none !important; }
.ipak button { font-family: inherit; }

/* Progres */
.ipak-progress { height: 4px; background: var(--ipak-soft); border-radius: 4px; overflow: hidden; margin-bottom: 28px; }
.ipak-progress span { display: block; height: 100%; width: 4%; background: var(--ipak-primary); transition: width .35s ease; }

.ipak-screen { animation: ipak-in .25s ease-out; }
@keyframes ipak-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Titluri */
.ipak .ipak-h { margin: 0 0 8px; color: var(--ipak-ink); font-weight: 700; line-height: 1.25; }
.ipak .ipak-h:focus { outline: none; }
.ipak .ipak-h-lg { font-size: clamp(1.35rem, 3vw, 1.75rem); }
.ipak .ipak-h-q { font-size: 1.2rem; }
.ipak .ipak-h-c { font-size: 1.2rem; text-align: center; margin: 22px 0 14px; }
.ipak-sub { margin: 0 0 30px; color: var(--ipak-ink); }
.ipak-desc { margin: 0 0 16px; font-size: .88rem; color: var(--ipak-muted); }
.ipak-empty, .ipak-none { color: var(--ipak-muted); text-align: center; padding: 20px; }

/* Căutare + grilă modele */
.ipak-search { max-width: 970px; margin: 0 auto 40px; }
.ipak-search input {
	width: 100%; padding: 11px 18px 11px 44px; font-size: 1rem; color: var(--ipak-ink);
	border: 1px solid #48475a; border-radius: 10px; background: var(--ipak-bg);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a6880' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: 16px center; background-size: 18px;
}
.ipak-search input:focus { outline: 2px solid var(--ipak-select); outline-offset: 1px; }

.ipak-mgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ipak .ipak-mcard {
	all: unset; box-sizing: border-box; cursor: pointer;
	display: flex; flex-direction: column; align-items: center; justify-content: space-between;
	padding: 26px 16px 22px; min-height: 285px;
	border: 1px solid #1d1a33; border-radius: 12px; background: var(--ipak-bg);
	transition: transform .15s, box-shadow .15s, border-color .15s;
}
.ipak .ipak-mcard:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(29, 26, 51, .1); }
.ipak .ipak-mcard:focus-visible { outline: 3px solid var(--ipak-select); outline-offset: 2px; }
.ipak .ipak-mcard.is-active { border-color: var(--ipak-select); box-shadow: 0 0 0 1px var(--ipak-select); }
.ipak-mpic { display: flex; align-items: center; justify-content: center; height: 180px; width: 100%; }
.ipak-mpic img, .ipak-mpic svg { max-height: 100%; max-width: 85%; object-fit: contain; }
.ipak-mpic svg { height: 160px; }
.ipak-mname { margin-top: 16px; font-weight: 500; text-align: center; color: var(--ipak-ink); }

/* Ecran împărțit: ilustrație + întrebare */
.ipak-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.ipak-visual { display: flex; align-items: center; justify-content: center; min-height: 460px; }
.ipak-visual img { max-width: 100%; max-height: 480px; object-fit: contain; }
.ipak-visual svg { height: 460px; max-width: 100%; }
.ipak-panel { display: flex; flex-direction: column; min-height: 460px; padding-top: 8px; }
.ipak-model-name { font-size: .9rem; color: var(--ipak-muted); margin-bottom: 10px; }

/* Grupuri de butoane mici (Culoare / Memorie / Rețea) */
.ipak-group { margin-bottom: 18px; }
.ipak-group .ipak-h { font-size: 1.15rem; color: #5b5872; font-weight: 600; margin-bottom: 12px; }
.ipak-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; }

.ipak .ipak-opt {
	all: unset; box-sizing: border-box; cursor: pointer; text-align: center;
	color: var(--ipak-ink); transition: border-color .15s, background .15s, color .15s;
}
.ipak .ipak-opt:focus-visible { outline: 2px solid var(--ipak-select); outline-offset: 2px; }
.ipak .ipak-chip {
	padding: 11px 10px; min-height: 44px; display: flex; align-items: center; justify-content: center;
	font-size: .85rem; font-weight: 600; line-height: 1.2;
	background: var(--ipak-soft); border: 1px solid var(--ipak-line); border-radius: 8px;
}
.ipak .ipak-chip:hover { border-color: var(--ipak-select); }
.ipak .ipak-chip.is-active { background: var(--ipak-bg); border-color: var(--ipak-select); color: var(--ipak-select); box-shadow: inset 0 0 0 1px var(--ipak-select); }

/* Listă de variante (întrebări) */
.ipak-list { display: flex; flex-direction: column; gap: 20px; }
.ipak .ipak-row {
	padding: 13px 18px; font-size: 1.02rem; font-weight: 600; color: #4d4a64;
	background: var(--ipak-bg); border: 1px solid var(--ipak-line); border-radius: 6px;
}
.ipak .ipak-row:hover { border-color: #a9a8ba; }
.ipak .ipak-row.is-active { border-color: var(--ipak-select); color: var(--ipak-select); }
.ipak .ipak-check { position: relative; }
.ipak .ipak-check::before {
	content: ""; position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
	width: 18px; height: 18px; border: 1.5px solid var(--ipak-line); border-radius: 5px; background: var(--ipak-bg);
}
.ipak .ipak-check.is-active::before {
	background: var(--ipak-select); border-color: var(--ipak-select);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-size: 14px; background-position: center; background-repeat: no-repeat;
}
.ipak-note { margin: -12px 0 0; padding: 0 0 0 20px; font-size: .85rem; color: var(--ipak-muted); }

/* Baterie */
.ipak-battery { padding: 24px 4px 10px; }
.ipak-bval { font-size: 2.6rem; font-weight: 800; color: var(--ipak-select); line-height: 1; margin-bottom: 22px; font-variant-numeric: tabular-nums; }
.ipak-battery input[type=range] {
	-webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; margin: 10px 0;
	background: linear-gradient(to right, var(--ipak-select) var(--p, 100%), var(--ipak-line) var(--p, 100%));
	cursor: pointer;
}
.ipak-battery input[type=range]::-webkit-slider-thumb {
	-webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%;
	background: radial-gradient(circle, #dcdce2 0 38%, #fff 40%); border: 1px solid #c9c9d2; box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.ipak-battery input[type=range]::-moz-range-thumb {
	width: 34px; height: 34px; border-radius: 50%;
	background: radial-gradient(circle, #dcdce2 0 38%, #fff 40%); border: 1px solid #c9c9d2; box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.ipak-battery input[type=range]:focus-visible { outline: 2px solid var(--ipak-select); outline-offset: 8px; }
.ipak-ticks { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 600; color: #8d8b9c; margin-top: 6px; }

/* Navigare */
.ipak-nav { display: flex; justify-content: flex-end; align-items: center; gap: 28px; margin-top: auto; padding-top: 36px; }
.ipak .ipak-back { all: unset; cursor: pointer; font-weight: 700; color: var(--ipak-ink); padding: 8px 4px; }
.ipak .ipak-back:hover { text-decoration: underline; }
.ipak .ipak-back:focus-visible { outline: 2px solid var(--ipak-select); outline-offset: 2px; }
.ipak .ipak-next {
	all: unset; box-sizing: border-box; cursor: pointer; text-align: center;
	min-width: 185px; padding: 11px 22px; border-radius: 4px; font-weight: 700;
	background: var(--ipak-primary); color: var(--ipak-ink);
	transition: filter .15s;
}
.ipak .ipak-next:hover { filter: brightness(1.05); }
.ipak .ipak-next:focus-visible { outline: 2px solid var(--ipak-select); outline-offset: 2px; }
.ipak .ipak-next:disabled { background: var(--ipak-soft); color: #a7a6b4; cursor: not-allowed; filter: none; }

/* Ofertă */
.ipak-center { max-width: 560px; margin: 0 auto; }
.ipak-card { border: 1px solid var(--ipak-line); border-radius: 14px; padding: 4px 22px 22px; }
.ipak-item { display: flex; gap: 18px; align-items: center; background: #f6f6f9; border: 1px solid #e6e6ec; border-radius: 10px; padding: 16px; }
.ipak-thumb { width: 82px; height: 82px; flex: none; background: #fff; border: 1px solid #e6e6ec; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 6px; }
.ipak-thumb img, .ipak-thumb svg { max-width: 100%; max-height: 100%; object-fit: contain; }
.ipak-item-name { font-weight: 700; }
.ipak-item-meta { font-size: .85rem; color: var(--ipak-muted); margin: 2px 0 6px; }
.ipak-item-price { font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.ipak-pay { display: flex; gap: 14px; align-items: center; cursor: pointer; border: 1px solid var(--ipak-line); border-radius: 10px; padding: 18px 20px; margin-bottom: 14px; transition: border-color .15s; }
.ipak-pay:hover { border-color: #a9a8ba; }
.ipak-pay.is-active { border-color: var(--ipak-select); box-shadow: inset 0 0 0 1px var(--ipak-select); }
.ipak-pay input { accent-color: var(--ipak-select); width: 18px; height: 18px; flex: none; margin: 0; }
.ipak-pay-body { flex: 1; }
.ipak-pay-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ipak-pay-top strong { font-size: 1.05rem; }
.ipak-pay p { margin: 6px 0 0; font-size: .85rem; color: var(--ipak-muted); }
.ipak-badge { padding: 3px 9px; border-radius: 4px; font-weight: 700; font-size: .95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ipak-badge.is-hi { background: var(--ipak-primary); color: var(--ipak-ink); }
.ipak-badge.is-lo { background: #5b5872; color: #fff; }
.ipak-guar { border-left: 3px solid var(--ipak-select); padding: 2px 0 2px 16px; margin: 4px 0 18px; font-size: .88rem; color: var(--ipak-muted); }
.ipak-guar p { margin: 0 0 4px; }
.ipak-guar ul { margin: 0; padding-left: 18px; }
.ipak-disc { font-size: .8rem; color: var(--ipak-muted); margin: 10px 0 0; }
.ipak-reject { text-align: center; padding: 24px; margin-top: 18px; border-radius: 12px; background: #fdf1f0; color: #9e2f26; font-weight: 600; }
.ipak-reject p { margin: 0 0 16px; }

/* Formular */
.ipak-sum { text-align: center; margin: 0 0 20px; }
.ipak-field { display: block; margin-bottom: 14px; }
.ipak-field > span, .ipak-fs legend { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; padding: 0; }
.ipak-field input, .ipak-field textarea {
	width: 100%; padding: 11px 14px; font: inherit; color: var(--ipak-ink);
	border: 1px solid var(--ipak-line); border-radius: 8px; background: var(--ipak-bg);
}
.ipak-field textarea { min-height: 80px; resize: vertical; }
.ipak-field input:focus, .ipak-field textarea:focus { outline: 2px solid var(--ipak-select); outline-offset: 0; border-color: transparent; }
.ipak-frow { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.ipak-fs { border: 0; padding: 0; margin: 0 0 14px; }
.ipak-fs .ipak-chips { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ipak-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--ipak-muted); cursor: pointer; }
.ipak-consent input { margin-top: 3px; accent-color: var(--ipak-select); width: 16px; height: 16px; flex: none; }
.ipak-consent a { color: var(--ipak-select); }
.ipak-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.ipak-err { color: #b3261e; font-weight: 600; font-size: .9rem; margin: 12px 0 0; }
.ipak-done { text-align: center; padding: 30px 0; color: var(--ipak-select); }
.ipak-done .ipak-h { color: var(--ipak-ink); }

/* Responsive */
@media (max-width: 900px) {
	.ipak-mgrid { grid-template-columns: repeat(3, 1fr); }
	.ipak-split { gap: 24px; }
}
@media (max-width: 720px) {
	.ipak-mgrid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.ipak .ipak-mcard { min-height: 220px; padding: 18px 10px; }
	.ipak-mpic { height: 130px; }
	.ipak-mpic svg { height: 120px; }
	.ipak-split { grid-template-columns: 1fr; }
	.ipak-visual { min-height: 0; }
	.ipak-visual img { max-height: 220px; }
	.ipak-visual svg { height: 220px; }
	.ipak-panel { min-height: 0; }
	.ipak-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ipak-list { gap: 12px; }
	.ipak-nav { justify-content: space-between; }
	.ipak .ipak-next { min-width: 0; flex: 1; max-width: 240px; }
	.ipak-frow { grid-template-columns: 1fr; }
}
.ipak .ipak-row.ipak-check { padding-left: 48px; }
@media (max-width: 720px) { .ipak-note { margin-top: -4px; } }
@media (prefers-reduced-motion: reduce) {
	.ipak-screen { animation: none; }
	.ipak-progress span, .ipak .ipak-mcard { transition: none; }
}
