@primestyleai/tryon 4.2.0 → 4.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react/index.js +249 -299
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -1014,7 +1014,7 @@ function PrimeStyleTryonInner({
|
|
|
1014
1014
|
if (p.weightUnit) setWeightUnit(p.weightUnit);
|
|
1015
1015
|
setFormKey((k) => k + 1);
|
|
1016
1016
|
}, [profiles]);
|
|
1017
|
-
|
|
1017
|
+
useCallback((name, asNew) => {
|
|
1018
1018
|
const id = (asNew ? null : activeProfileId) || `p_${Date.now()}`;
|
|
1019
1019
|
const p = {
|
|
1020
1020
|
id,
|
|
@@ -1170,24 +1170,6 @@ function PrimeStyleTryonInner({
|
|
|
1170
1170
|
] })
|
|
1171
1171
|
] }, i)) }) });
|
|
1172
1172
|
}
|
|
1173
|
-
function InputRow({ label, fieldKey, placeholder, type = "text", unit }) {
|
|
1174
|
-
return /* @__PURE__ */ jsxs("div", { className: "ps-tryon-input-row", children: [
|
|
1175
|
-
/* @__PURE__ */ jsx("label", { children: label }),
|
|
1176
|
-
/* @__PURE__ */ jsx(
|
|
1177
|
-
"input",
|
|
1178
|
-
{
|
|
1179
|
-
type,
|
|
1180
|
-
placeholder,
|
|
1181
|
-
defaultValue: formRef.current[fieldKey] || "",
|
|
1182
|
-
onInput: (e) => updateField(fieldKey, e.target.value)
|
|
1183
|
-
}
|
|
1184
|
-
),
|
|
1185
|
-
unit && /* @__PURE__ */ jsx("span", { className: "ps-tryon-input-unit", children: unit })
|
|
1186
|
-
] });
|
|
1187
|
-
}
|
|
1188
|
-
function UnitToggle({ options, value, onChange }) {
|
|
1189
|
-
return /* @__PURE__ */ jsx("div", { className: "ps-tryon-unit-toggle", children: options.map((o) => /* @__PURE__ */ jsx("button", { className: `ps-tryon-unit-btn${value === o.value ? " ps-active" : ""}`, onClick: () => onChange(o.value), children: o.label }, o.value)) });
|
|
1190
|
-
}
|
|
1191
1173
|
function WelcomeView() {
|
|
1192
1174
|
return /* @__PURE__ */ jsxs("div", { className: "ps-tryon-welcome", children: [
|
|
1193
1175
|
/* @__PURE__ */ jsxs("div", { className: "ps-tryon-welcome-hero", children: [
|
|
@@ -1195,12 +1177,12 @@ function PrimeStyleTryonInner({
|
|
|
1195
1177
|
/* @__PURE__ */ jsx("img", { src: productImage, alt: "Product", className: "ps-tryon-welcome-product" }),
|
|
1196
1178
|
/* @__PURE__ */ jsx("div", { className: "ps-tryon-welcome-sparkle", children: /* @__PURE__ */ jsx(SparkleIcon, { size: 20 }) })
|
|
1197
1179
|
] }),
|
|
1198
|
-
/* @__PURE__ */ jsx("h2", { className: "ps-tryon-welcome-title", children: t("Find Your
|
|
1199
|
-
/* @__PURE__ */ jsx("p", { className: "ps-tryon-welcome-sub", children: t("Get
|
|
1180
|
+
/* @__PURE__ */ jsx("h2", { className: "ps-tryon-welcome-title", children: t("Find Your Size & See It On You") }),
|
|
1181
|
+
/* @__PURE__ */ jsx("p", { className: "ps-tryon-welcome-sub", children: t("Get the perfect fit, then try it on virtually") })
|
|
1200
1182
|
] }),
|
|
1201
1183
|
/* @__PURE__ */ jsx("div", { className: "ps-tryon-features", children: [
|
|
1202
|
-
{ icon: /* @__PURE__ */ jsx(RulerIcon, {}), title: t("Get Your Size"), desc: t("Instant fit recommendation") },
|
|
1203
|
-
{ icon: /* @__PURE__ */ jsx(CameraIcon, {}), title: t("Try It On"), desc: t("See how it looks on you") }
|
|
1184
|
+
{ icon: /* @__PURE__ */ jsx(RulerIcon, { size: 22 }), title: t("Get Your Size"), desc: t("Instant fit recommendation") },
|
|
1185
|
+
{ icon: /* @__PURE__ */ jsx(CameraIcon, { size: 22 }), title: t("Try It On"), desc: t("See how it looks on you") }
|
|
1204
1186
|
].map((f, i) => /* @__PURE__ */ jsxs("div", { className: "ps-tryon-feature", children: [
|
|
1205
1187
|
/* @__PURE__ */ jsx("div", { className: "ps-tryon-feature-icon", children: f.icon }),
|
|
1206
1188
|
/* @__PURE__ */ jsx("div", { className: "ps-tryon-feature-title", children: f.title }),
|
|
@@ -1264,233 +1246,131 @@ function PrimeStyleTryonInner({
|
|
|
1264
1246
|
) });
|
|
1265
1247
|
}
|
|
1266
1248
|
function SizingChoiceView() {
|
|
1249
|
+
const [mode, setMode] = useState(sizingMethod === "exact" ? "exact" : "quick");
|
|
1250
|
+
const isCm = sizingUnit === "cm";
|
|
1267
1251
|
const sgAvailable = sizeGuide?.found === true;
|
|
1268
1252
|
const sgChecked = !sizeGuideFetching && sizeGuide !== null;
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
}, children: [
|
|
1285
|
-
|
|
1286
|
-
" ",
|
|
1287
|
-
|
|
1288
|
-
] })
|
|
1253
|
+
const exactAvailable = sgChecked ? sgAvailable : true;
|
|
1254
|
+
const handleSubmit = async () => {
|
|
1255
|
+
setSizingMethod(mode);
|
|
1256
|
+
setSizingLoading(true);
|
|
1257
|
+
setView("size-result");
|
|
1258
|
+
await submitSizing();
|
|
1259
|
+
};
|
|
1260
|
+
const renderQuickFields = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1261
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-tryon-sf-row", children: [
|
|
1262
|
+
/* @__PURE__ */ jsx("label", { className: "ps-tryon-sf-label", children: t("HEIGHT") }),
|
|
1263
|
+
/* @__PURE__ */ jsx("div", { className: "ps-tryon-sf-input-wrap", children: heightUnit === "ft" ? /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sf-ft-group", children: [
|
|
1264
|
+
/* @__PURE__ */ jsx("input", { type: "number", placeholder: "5", className: "ps-tryon-sf-input", defaultValue: formRef.current.heightFeet || "", onInput: (e) => updateField("heightFeet", e.target.value) }),
|
|
1265
|
+
/* @__PURE__ */ jsx("span", { className: "ps-tryon-sf-unit", children: t("feet") }),
|
|
1266
|
+
/* @__PURE__ */ jsx("input", { type: "number", placeholder: "10", className: "ps-tryon-sf-input", defaultValue: formRef.current.heightInches || "", onInput: (e) => updateField("heightInches", e.target.value) }),
|
|
1267
|
+
/* @__PURE__ */ jsx("span", { className: "ps-tryon-sf-unit", children: t("inches") })
|
|
1268
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sf-inline", children: [
|
|
1269
|
+
/* @__PURE__ */ jsx("input", { type: "number", placeholder: "175", className: "ps-tryon-sf-input", defaultValue: formRef.current.height || "", onInput: (e) => updateField("height", e.target.value) }),
|
|
1270
|
+
/* @__PURE__ */ jsx("span", { className: "ps-tryon-sf-unit", children: t("cm") })
|
|
1271
|
+
] }) })
|
|
1289
1272
|
] }),
|
|
1290
|
-
/* @__PURE__ */ jsxs("div", { className: "ps-tryon-
|
|
1291
|
-
/* @__PURE__ */
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-choice-icon", children: /* @__PURE__ */ jsx(RulerIcon, { size: 24 }) }),
|
|
1296
|
-
/* @__PURE__ */ jsxs("div", { className: "ps-tryon-choice-info", children: [
|
|
1297
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-choice-title", children: t("Enter my measurements") }),
|
|
1298
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-choice-desc", children: sizeGuide?.requiredFields?.length ? sizeGuide.requiredFields.filter((f) => f.required).slice(0, 3).map((f) => t(f.label)).join(", ") + (sizeGuide.requiredFields.length > 3 ? ` ${t("& more")}` : "") : t("Chest, waist, hips, shoes & more") })
|
|
1299
|
-
] }),
|
|
1300
|
-
/* @__PURE__ */ jsx("span", { className: "ps-tryon-choice-badge", children: t("Best accuracy") })
|
|
1301
|
-
] }),
|
|
1302
|
-
/* @__PURE__ */ jsxs("button", { className: "ps-tryon-choice-card", onClick: () => {
|
|
1303
|
-
setSizingMethod("quick");
|
|
1304
|
-
setView("sizing-form");
|
|
1305
|
-
}, children: [
|
|
1306
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-choice-icon", children: /* @__PURE__ */ jsx(SparkleIcon, { size: 24 }) }),
|
|
1307
|
-
/* @__PURE__ */ jsxs("div", { className: "ps-tryon-choice-info", children: [
|
|
1308
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-choice-title", children: t("Just height & weight") }),
|
|
1309
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-choice-desc", children: t("Quick estimate in seconds") })
|
|
1310
|
-
] })
|
|
1311
|
-
] }),
|
|
1312
|
-
/* @__PURE__ */ jsxs("button", { className: "ps-tryon-choice-card", onClick: () => {
|
|
1313
|
-
setSizingMethod(null);
|
|
1314
|
-
setView("upload");
|
|
1315
|
-
}, children: [
|
|
1316
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-choice-icon", children: /* @__PURE__ */ jsx(CameraIcon, { size: 24 }) }),
|
|
1317
|
-
/* @__PURE__ */ jsxs("div", { className: "ps-tryon-choice-info", children: [
|
|
1318
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-choice-title", children: t("Skip, just try it on") }),
|
|
1319
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-choice-desc", children: t("Upload a photo to see how it looks") })
|
|
1320
|
-
] })
|
|
1273
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-tryon-sf-row", children: [
|
|
1274
|
+
/* @__PURE__ */ jsx("label", { className: "ps-tryon-sf-label", children: t("WEIGHT") }),
|
|
1275
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-tryon-sf-inline", children: [
|
|
1276
|
+
/* @__PURE__ */ jsx("input", { type: "number", placeholder: weightUnit === "lbs" ? "170" : "75", className: "ps-tryon-sf-input", defaultValue: formRef.current.weight || "", onInput: (e) => updateField("weight", e.target.value) }),
|
|
1277
|
+
/* @__PURE__ */ jsx("span", { className: "ps-tryon-sf-unit", children: weightUnit })
|
|
1321
1278
|
] })
|
|
1322
1279
|
] })
|
|
1323
1280
|
] });
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
if (e.target.value) applyProfile(e.target.value);
|
|
1338
|
-
}, children: [
|
|
1339
|
-
/* @__PURE__ */ jsx("option", { value: "", children: t("Auto-fill from saved profile...") }),
|
|
1340
|
-
profiles.map((p) => /* @__PURE__ */ jsxs("option", { value: p.id, children: [
|
|
1341
|
-
p.name,
|
|
1342
|
-
" (",
|
|
1343
|
-
p.gender === "female" ? t("Women's") : t("Men's"),
|
|
1344
|
-
")"
|
|
1345
|
-
] }, p.id))
|
|
1346
|
-
] }) }),
|
|
1347
|
-
sizingMethod === "exact" && /* @__PURE__ */ jsxs("div", { className: "ps-tryon-unit-tabs", children: [
|
|
1348
|
-
/* @__PURE__ */ jsx("button", { className: `ps-tryon-unit-tab${isCm ? " ps-active" : ""}`, onClick: () => {
|
|
1349
|
-
setSizingUnit("cm");
|
|
1350
|
-
setHeightUnit("cm");
|
|
1351
|
-
setWeightUnit("kg");
|
|
1352
|
-
}, children: "CM" }),
|
|
1353
|
-
/* @__PURE__ */ jsx("button", { className: `ps-tryon-unit-tab${!isCm ? " ps-active" : ""}`, onClick: () => {
|
|
1354
|
-
setSizingUnit("in");
|
|
1355
|
-
setHeightUnit("ft");
|
|
1356
|
-
setWeightUnit("lbs");
|
|
1357
|
-
}, children: "Inches" })
|
|
1358
|
-
] }),
|
|
1359
|
-
sizingMethod === "exact" ? /* @__PURE__ */ jsx(Fragment, { children: (() => {
|
|
1360
|
-
const reqFields = dynamicFields.filter((f) => f.required);
|
|
1361
|
-
const optFields = dynamicFields.filter((f) => !f.required);
|
|
1362
|
-
const isShoeProduct = reqFields.some((f) => f.category === "shoe");
|
|
1363
|
-
const isClothingProduct = reqFields.some((f) => f.category === "body");
|
|
1364
|
-
const renderField = (field) => {
|
|
1365
|
-
if (["shoeEU", "shoeUS", "shoeUK"].includes(field.key)) {
|
|
1366
|
-
const regionField = shoeField;
|
|
1367
|
-
const key = regionField.key;
|
|
1368
|
-
const showOriginal = field.key !== key;
|
|
1369
|
-
return /* @__PURE__ */ jsxs("span", { children: [
|
|
1370
|
-
/* @__PURE__ */ jsx(InputRow, { label: `${regionField.label}${field.required ? " *" : ""}`, fieldKey: key, placeholder: regionField.ph }),
|
|
1371
|
-
showOriginal && /* @__PURE__ */ jsx(InputRow, { label: t(field.label), fieldKey: field.key, placeholder: field.placeholder })
|
|
1372
|
-
] }, field.key);
|
|
1373
|
-
}
|
|
1374
|
-
const phNum = parseFloat(field.placeholder?.replace(/[^0-9.]/g, "") || "");
|
|
1375
|
-
const phIn = !isNaN(phNum) && phNum > 0 && field.unit === "cm" ? String(Math.round(phNum / 2.54)) : "";
|
|
1376
|
-
const placeholder = isCm ? field.placeholder || "" : phIn ? `e.g. ${phIn}` : field.placeholder || "";
|
|
1377
|
-
return /* @__PURE__ */ jsx(
|
|
1378
|
-
InputRow,
|
|
1379
|
-
{
|
|
1380
|
-
label: `${t(field.label)}${field.required ? " *" : ""}`,
|
|
1381
|
-
fieldKey: field.key,
|
|
1382
|
-
placeholder,
|
|
1383
|
-
type: "number",
|
|
1384
|
-
unit: field.unit === "cm" ? sizingUnit : void 0
|
|
1385
|
-
},
|
|
1386
|
-
field.key
|
|
1387
|
-
);
|
|
1388
|
-
};
|
|
1389
|
-
const profileExtras = [];
|
|
1390
|
-
if (isShoeProduct && !dynamicFields.some((f) => f.category === "body")) {
|
|
1391
|
-
const bodyFields = isFemale ? FALLBACK_FIELDS_FEMALE : FALLBACK_FIELDS_MALE;
|
|
1392
|
-
for (const f of bodyFields) {
|
|
1393
|
-
if (!dynamicFields.some((d) => d.key === f.key)) {
|
|
1394
|
-
profileExtras.push({ ...f, required: false });
|
|
1395
|
-
}
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
if (isClothingProduct && !dynamicFields.some((f) => f.category === "shoe")) {
|
|
1399
|
-
profileExtras.push({ key: "footLengthCm", label: "Foot length", required: false, unit: "cm", placeholder: "e.g. 27", category: "shoe" });
|
|
1400
|
-
profileExtras.push({ key: shoeField.key, label: shoeField.label, required: false, unit: "size", placeholder: shoeField.ph, category: "shoe" });
|
|
1281
|
+
const renderExactFields = () => {
|
|
1282
|
+
const reqFields = dynamicFields.filter((f) => f.required);
|
|
1283
|
+
const optFields = dynamicFields.filter((f) => !f.required);
|
|
1284
|
+
const renderField = (field) => {
|
|
1285
|
+
if (["shoeEU", "shoeUS", "shoeUK"].includes(field.key)) {
|
|
1286
|
+
const regionField = shoeField;
|
|
1287
|
+
return /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sf-row", children: [
|
|
1288
|
+
/* @__PURE__ */ jsxs("label", { className: "ps-tryon-sf-label", children: [
|
|
1289
|
+
regionField.label.toUpperCase(),
|
|
1290
|
+
field.required ? " *" : ""
|
|
1291
|
+
] }),
|
|
1292
|
+
/* @__PURE__ */ jsx("div", { className: "ps-tryon-sf-inline", children: /* @__PURE__ */ jsx("input", { type: "text", placeholder: regionField.ph, className: "ps-tryon-sf-input", defaultValue: formRef.current[regionField.key] || "", onInput: (e) => updateField(regionField.key, e.target.value) }) })
|
|
1293
|
+
] }, field.key);
|
|
1401
1294
|
}
|
|
1402
|
-
const
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
/* @__PURE__ */ jsx("label", { children: t("Fit type") }),
|
|
1410
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-unit-toggle", children: ["petite", "standard", "tall", "plus"].map((fp) => /* @__PURE__ */ jsx(
|
|
1411
|
-
"button",
|
|
1412
|
-
{
|
|
1413
|
-
className: `ps-tryon-unit-btn${(formRef.current.fitPreference || "standard") === fp ? " ps-active" : ""}`,
|
|
1414
|
-
onClick: (e) => {
|
|
1415
|
-
updateField("fitPreference", fp);
|
|
1416
|
-
const btns = e.target.parentElement.querySelectorAll(".ps-tryon-unit-btn");
|
|
1417
|
-
btns.forEach((b) => b.classList.toggle("ps-active", b.dataset.fp === fp));
|
|
1418
|
-
},
|
|
1419
|
-
"data-fp": fp,
|
|
1420
|
-
children: t(fp.charAt(0).toUpperCase() + fp.slice(1))
|
|
1421
|
-
},
|
|
1422
|
-
fp
|
|
1423
|
-
)) })
|
|
1295
|
+
const phNum = parseFloat(field.placeholder?.replace(/[^0-9.]/g, "") || "");
|
|
1296
|
+
const phIn = !isNaN(phNum) && phNum > 0 && field.unit === "cm" ? String(Math.round(phNum / 2.54)) : "";
|
|
1297
|
+
const placeholder = isCm ? field.placeholder?.replace("e.g. ", "") || "" : phIn || field.placeholder?.replace("e.g. ", "") || "";
|
|
1298
|
+
return /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sf-row", children: [
|
|
1299
|
+
/* @__PURE__ */ jsxs("label", { className: "ps-tryon-sf-label", children: [
|
|
1300
|
+
t(field.label).toUpperCase(),
|
|
1301
|
+
field.required ? " *" : ""
|
|
1424
1302
|
] }),
|
|
1425
|
-
|
|
1426
|
-
/* @__PURE__ */
|
|
1427
|
-
|
|
1428
|
-
const arrow = e.target.closest(".ps-tryon-optional-toggle").querySelector(".ps-tryon-chevron");
|
|
1429
|
-
if (wrap) {
|
|
1430
|
-
const open = wrap.style.display !== "none";
|
|
1431
|
-
wrap.style.display = open ? "none" : "flex";
|
|
1432
|
-
if (arrow) arrow.style.transform = open ? "rotate(0deg)" : "rotate(180deg)";
|
|
1433
|
-
}
|
|
1434
|
-
}, children: [
|
|
1435
|
-
/* @__PURE__ */ jsx("span", { children: t("Optional — improve accuracy & save to profile") }),
|
|
1436
|
-
/* @__PURE__ */ jsx("span", { className: "ps-tryon-chevron", children: "▾" })
|
|
1437
|
-
] }),
|
|
1438
|
-
/* @__PURE__ */ jsx("div", { className: "ps-tryon-optional-fields", style: { display: "none" }, children: allOptFields.map(renderField) })
|
|
1303
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-tryon-sf-inline", children: [
|
|
1304
|
+
/* @__PURE__ */ jsx("input", { type: "number", placeholder, className: "ps-tryon-sf-input", defaultValue: formRef.current[field.key] || "", onInput: (e) => updateField(field.key, e.target.value) }),
|
|
1305
|
+
field.unit === "cm" && /* @__PURE__ */ jsx("span", { className: "ps-tryon-sf-unit", children: sizingUnit })
|
|
1439
1306
|
] })
|
|
1440
|
-
] });
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
heightUnit === "ft" ? /* @__PURE__ */ jsxs("div", { className: "ps-tryon-height-ft", children: [
|
|
1448
|
-
/* @__PURE__ */ jsx("input", { type: "number", placeholder: "5", defaultValue: formRef.current.heightFeet || "", onInput: (e) => updateField("heightFeet", e.target.value) }),
|
|
1449
|
-
/* @__PURE__ */ jsx("span", { children: t("ft") }),
|
|
1450
|
-
/* @__PURE__ */ jsx("input", { type: "number", placeholder: "4", defaultValue: formRef.current.heightInches || "", onInput: (e) => updateField("heightInches", e.target.value) }),
|
|
1451
|
-
/* @__PURE__ */ jsx("span", { children: t("in") })
|
|
1452
|
-
] }) : /* @__PURE__ */ jsx("input", { type: "number", placeholder: "e.g. 175", defaultValue: formRef.current.height || "", onInput: (e) => updateField("height", e.target.value) }),
|
|
1453
|
-
/* @__PURE__ */ jsx(UnitToggle, { options: [{ label: t("cm"), value: "cm" }, { label: t("ft"), value: "ft" }], value: heightUnit, onChange: setHeightUnit })
|
|
1454
|
-
] }),
|
|
1455
|
-
/* @__PURE__ */ jsxs("div", { className: "ps-tryon-input-row", children: [
|
|
1456
|
-
/* @__PURE__ */ jsxs("label", { children: [
|
|
1457
|
-
t("Weight"),
|
|
1458
|
-
" *"
|
|
1459
|
-
] }),
|
|
1460
|
-
/* @__PURE__ */ jsx("input", { type: "number", placeholder: weightUnit === "lbs" ? "e.g. 170" : "e.g. 75", defaultValue: formRef.current.weight || "", onInput: (e) => updateField("weight", e.target.value) }),
|
|
1461
|
-
/* @__PURE__ */ jsx(UnitToggle, { options: [{ label: t("kg"), value: "kg" }, { label: t("lbs"), value: "lbs" }], value: weightUnit, onChange: setWeightUnit })
|
|
1307
|
+
] }, field.key);
|
|
1308
|
+
};
|
|
1309
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1310
|
+
reqFields.map(renderField),
|
|
1311
|
+
optFields.length > 0 && /* @__PURE__ */ jsxs("details", { className: "ps-tryon-sf-optional", children: [
|
|
1312
|
+
/* @__PURE__ */ jsx("summary", { className: "ps-tryon-sf-optional-toggle", children: t("Optional fields") }),
|
|
1313
|
+
/* @__PURE__ */ jsx("div", { className: "ps-tryon-sf-optional-fields", children: optFields.map(renderField) })
|
|
1462
1314
|
] })
|
|
1463
|
-
] })
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1315
|
+
] });
|
|
1316
|
+
};
|
|
1317
|
+
return /* @__PURE__ */ jsxs("div", { className: "ps-tryon-sizing-split", children: [
|
|
1318
|
+
/* @__PURE__ */ jsx("div", { className: "ps-tryon-sizing-img-col", children: /* @__PURE__ */ jsx("img", { src: productImage, alt: productTitle, className: "ps-tryon-sizing-product-img" }) }),
|
|
1319
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-tryon-sizing-form-col", children: [
|
|
1320
|
+
/* @__PURE__ */ jsx("h3", { className: "ps-tryon-sf-title", children: t("Let's find your best fit") }),
|
|
1321
|
+
/* @__PURE__ */ jsxs("div", { className: "ps-tryon-sf-unit-tabs", children: [
|
|
1322
|
+
/* @__PURE__ */ jsx(
|
|
1323
|
+
"button",
|
|
1324
|
+
{
|
|
1325
|
+
className: `ps-tryon-sf-unit-tab${(isCm || heightUnit === "cm") && mode !== "exact" ? " ps-active" : ""} ${mode === "exact" && isCm ? " ps-active" : ""}`,
|
|
1326
|
+
onClick: () => {
|
|
1327
|
+
setSizingUnit("cm");
|
|
1328
|
+
setHeightUnit("cm");
|
|
1329
|
+
setWeightUnit("kg");
|
|
1330
|
+
},
|
|
1331
|
+
children: t("Metric")
|
|
1332
|
+
}
|
|
1333
|
+
),
|
|
1334
|
+
/* @__PURE__ */ jsx(
|
|
1335
|
+
"button",
|
|
1336
|
+
{
|
|
1337
|
+
className: `ps-tryon-sf-unit-tab${(!isCm || heightUnit === "ft") && mode !== "exact" ? " ps-active" : ""} ${mode === "exact" && !isCm ? " ps-active" : ""}`,
|
|
1338
|
+
onClick: () => {
|
|
1339
|
+
setSizingUnit("in");
|
|
1340
|
+
setHeightUnit("ft");
|
|
1341
|
+
setWeightUnit("lbs");
|
|
1342
|
+
},
|
|
1343
|
+
children: t("Imperial")
|
|
1344
|
+
}
|
|
1345
|
+
)
|
|
1469
1346
|
] }),
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
t("Get My Size"),
|
|
1490
|
-
" ",
|
|
1491
|
-
/* @__PURE__ */ jsx(ArrowRightIcon, {})
|
|
1347
|
+
mode === "exact" && profiles.length > 0 && /* @__PURE__ */ jsx("div", { className: "ps-tryon-sf-profile-bar", children: /* @__PURE__ */ jsxs("select", { className: "ps-tryon-sf-profile-select", value: activeProfileId || "", onChange: (e) => {
|
|
1348
|
+
if (e.target.value) applyProfile(e.target.value);
|
|
1349
|
+
}, children: [
|
|
1350
|
+
/* @__PURE__ */ jsx("option", { value: "", children: t("Load saved profile...") }),
|
|
1351
|
+
profiles.map((p) => /* @__PURE__ */ jsx("option", { value: p.id, children: p.name }, p.id))
|
|
1352
|
+
] }) }),
|
|
1353
|
+
/* @__PURE__ */ jsx("div", { className: "ps-tryon-sf-fields", children: mode === "quick" ? renderQuickFields() : renderExactFields() }),
|
|
1354
|
+
/* @__PURE__ */ jsx("div", { className: "ps-tryon-sf-switch", children: mode === "quick" && exactAvailable ? /* @__PURE__ */ jsxs("button", { className: "ps-tryon-sf-switch-btn", onClick: () => {
|
|
1355
|
+
setMode("exact");
|
|
1356
|
+
setSizingMethod("exact");
|
|
1357
|
+
}, children: [
|
|
1358
|
+
t("I know my measurements"),
|
|
1359
|
+
" ",
|
|
1360
|
+
/* @__PURE__ */ jsx(ArrowRightIcon, {})
|
|
1361
|
+
] }) : mode === "exact" ? /* @__PURE__ */ jsx("button", { className: "ps-tryon-sf-switch-btn", onClick: () => {
|
|
1362
|
+
setMode("quick");
|
|
1363
|
+
setSizingMethod("quick");
|
|
1364
|
+
}, children: t("Not sure? Use height & weight instead") }) : null }),
|
|
1365
|
+
/* @__PURE__ */ jsx("button", { className: "ps-tryon-sf-next", onClick: handleSubmit, children: t("Next") })
|
|
1492
1366
|
] })
|
|
1493
|
-
] }
|
|
1367
|
+
] });
|
|
1368
|
+
}
|
|
1369
|
+
function SizingFormView() {
|
|
1370
|
+
useEffect(() => {
|
|
1371
|
+
setView("sizing-choice");
|
|
1372
|
+
}, []);
|
|
1373
|
+
return null;
|
|
1494
1374
|
}
|
|
1495
1375
|
function SizeResultView() {
|
|
1496
1376
|
const unitLbl = sizingUnit === "cm" ? t("cm") : t("in");
|
|
@@ -2046,30 +1926,31 @@ const STYLES = `
|
|
|
2046
1926
|
.ps-tryon-view-enter { animation: ps-fade-up 0.35s ease both; }
|
|
2047
1927
|
|
|
2048
1928
|
/* Welcome */
|
|
2049
|
-
.ps-tryon-welcome { text-align: center; }
|
|
2050
|
-
.ps-tryon-welcome-hero { margin-bottom: 1.
|
|
1929
|
+
.ps-tryon-welcome { text-align: center; padding: clamp(8px, 0.5vw, 12px) 0; }
|
|
1930
|
+
.ps-tryon-welcome-hero { margin-bottom: clamp(16px, 1.3vw, 24px); }
|
|
2051
1931
|
.ps-tryon-welcome-img-wrap { position: relative; display: inline-block; }
|
|
2052
|
-
.ps-tryon-welcome-product { width:
|
|
2053
|
-
.ps-tryon-welcome-sparkle { position: absolute; top: -0.
|
|
2054
|
-
.ps-tryon-welcome-sparkle svg { stroke: #111; width: 0.
|
|
2055
|
-
@keyframes ps-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-
|
|
2056
|
-
.ps-tryon-welcome-title { font-size: 1.
|
|
2057
|
-
.ps-tryon-welcome-sub { font-size: 0.
|
|
2058
|
-
.ps-tryon-features { display: flex; gap: 0.
|
|
2059
|
-
.ps-tryon-feature { flex: 1; padding: 0.
|
|
2060
|
-
.ps-tryon-feature
|
|
2061
|
-
.ps-tryon-feature-icon
|
|
2062
|
-
.ps-tryon-feature-
|
|
2063
|
-
.ps-tryon-feature-
|
|
1932
|
+
.ps-tryon-welcome-product { width: clamp(100px, 9vw, 160px); height: clamp(120px, 10.5vw, 190px); object-fit: cover; border-radius: clamp(10px, 0.9vw, 16px); border: 2px solid #333; box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
|
|
1933
|
+
.ps-tryon-welcome-sparkle { position: absolute; top: clamp(-6px, -0.5vw, -4px); right: clamp(-6px, -0.5vw, -4px); width: clamp(22px, 1.8vw, 30px); height: clamp(22px, 1.8vw, 30px); background: #bb945c; border-radius: 50%; display: flex; align-items: center; justify-content: center; animation: ps-float 3s ease-in-out infinite; }
|
|
1934
|
+
.ps-tryon-welcome-sparkle svg { stroke: #111; width: clamp(10px, 0.9vw, 14px); height: clamp(10px, 0.9vw, 14px); }
|
|
1935
|
+
@keyframes ps-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
|
|
1936
|
+
.ps-tryon-welcome-title { font-size: clamp(18px, 1.4vw, 24px); font-weight: 700; color: #fff; margin: clamp(12px, 1vw, 18px) 0 clamp(4px, 0.3vw, 6px); letter-spacing: -0.01em; }
|
|
1937
|
+
.ps-tryon-welcome-sub { font-size: clamp(13px, 0.9vw, 16px); color: #999; margin: 0; }
|
|
1938
|
+
.ps-tryon-features { display: flex; gap: clamp(8px, 0.7vw, 12px); margin: clamp(16px, 1.3vw, 24px) 0; }
|
|
1939
|
+
.ps-tryon-feature { flex: 1; padding: clamp(14px, 1vw, 18px) clamp(10px, 0.7vw, 14px); border: 1px solid #333; border-radius: clamp(10px, 0.8vw, 14px); text-align: center; transition: border-color 0.2s; }
|
|
1940
|
+
.ps-tryon-feature:hover { border-color: #555; }
|
|
1941
|
+
.ps-tryon-feature-icon { margin-bottom: clamp(6px, 0.4vw, 8px); color: #bb945c; display: flex; justify-content: center; }
|
|
1942
|
+
.ps-tryon-feature-icon svg { stroke: currentColor; fill: none; width: clamp(18px, 1.2vw, 22px); height: clamp(18px, 1.2vw, 22px); }
|
|
1943
|
+
.ps-tryon-feature-title { font-size: clamp(13px, 0.85vw, 15px); font-weight: 600; color: #fff; margin-bottom: 2px; }
|
|
1944
|
+
.ps-tryon-feature-desc { font-size: clamp(11px, 0.7vw, 13px); color: #999; }
|
|
2064
1945
|
.ps-tryon-cta {
|
|
2065
|
-
width: 100%; padding:
|
|
2066
|
-
border-radius: 0.
|
|
2067
|
-
display: flex; align-items: center; justify-content: center; gap: 0.
|
|
1946
|
+
width: 100%; padding: clamp(14px, 1vw, 18px); background: #bb945c; color: #111; border: none;
|
|
1947
|
+
border-radius: clamp(10px, 0.8vw, 14px); font-size: clamp(14px, 1vw, 17px); font-weight: 700; cursor: pointer;
|
|
1948
|
+
display: flex; align-items: center; justify-content: center; gap: clamp(6px, 0.5vw, 10px); transition: all 0.2s;
|
|
2068
1949
|
font-family: var(--ps-modal-font, system-ui, sans-serif);
|
|
2069
1950
|
}
|
|
2070
1951
|
.ps-tryon-cta:hover { background: #a07d4e; transform: translateY(-1px); }
|
|
2071
1952
|
.ps-tryon-cta svg { stroke: #111; }
|
|
2072
|
-
.ps-tryon-welcome-note { font-size: 0.
|
|
1953
|
+
.ps-tryon-welcome-note { font-size: clamp(11px, 0.7vw, 13px); color: #666; margin-top: clamp(10px, 0.7vw, 14px); }
|
|
2073
1954
|
|
|
2074
1955
|
/* Upload */
|
|
2075
1956
|
.ps-tryon-upload {
|
|
@@ -2121,59 +2002,128 @@ const STYLES = `
|
|
|
2121
2002
|
}
|
|
2122
2003
|
.ps-tryon-profile-select:focus { border-color: #bb945c; }
|
|
2123
2004
|
|
|
2124
|
-
/* Sizing
|
|
2125
|
-
.ps-tryon-sizing-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
background: #
|
|
2132
|
-
width: 100%; font-family: inherit; position: relative; overflow: hidden;
|
|
2133
|
-
}
|
|
2134
|
-
.ps-tryon-choice-card:hover { border-color: #bb945c; transform: translateY(-1px); box-shadow: 0 0.31vw 1.04vw rgba(187,148,92,0.08); }
|
|
2135
|
-
.ps-tryon-choice-card:hover::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #bb945c; }
|
|
2136
|
-
.ps-tryon-choice-icon { color: #bb945c; flex-shrink: 0; }
|
|
2137
|
-
.ps-tryon-choice-icon svg { stroke: currentColor; fill: none; }
|
|
2138
|
-
.ps-tryon-choice-info { flex: 1; min-width: 0; }
|
|
2139
|
-
.ps-tryon-choice-title { font-size: 0.73vw; font-weight: 600; color: #fff; }
|
|
2140
|
-
.ps-tryon-choice-desc { font-size: 0.63vw; color: #999; margin-top: 2px; }
|
|
2141
|
-
.ps-tryon-choice-badge {
|
|
2142
|
-
padding: 0.16vw 0.52vw; border-radius: 1.04vw; flex-shrink: 0;
|
|
2143
|
-
background: rgba(187,148,92,0.12); color: #bb945c; font-size: 0.52vw; font-weight: 600;
|
|
2144
|
-
}
|
|
2145
|
-
.ps-tryon-sg-notice {
|
|
2146
|
-
font-size: 0.68vw; color: #999; text-align: center; padding: 0.73vw 0.83vw;
|
|
2147
|
-
margin-bottom: 0.73vw; border: 1px solid #333; border-radius: 0.63vw; background: #1a1b1a;
|
|
2148
|
-
display: flex; flex-direction: column; align-items: center; gap: 0.57vw;
|
|
2149
|
-
}
|
|
2150
|
-
.ps-tryon-sg-notice-cta {
|
|
2151
|
-
display: inline-flex; align-items: center; gap: 0.31vw;
|
|
2152
|
-
padding: 0.42vw 1vw;
|
|
2153
|
-
background: #bb945c; color: #111; border: none; border-radius: 0.42vw;
|
|
2154
|
-
font-size: 0.68vw; font-weight: 700; cursor: pointer;
|
|
2155
|
-
transition: all 0.2s; font-family: inherit;
|
|
2005
|
+
/* Sizing — split layout (product image left, form right) */
|
|
2006
|
+
.ps-tryon-sizing-split {
|
|
2007
|
+
display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(16px, 1.5vw, 28px);
|
|
2008
|
+
min-height: clamp(300px, 22vw, 500px);
|
|
2009
|
+
}
|
|
2010
|
+
.ps-tryon-sizing-img-col {
|
|
2011
|
+
display: flex; align-items: stretch; justify-content: center;
|
|
2012
|
+
background: #0e0e0f; border-radius: clamp(10px, 0.8vw, 14px); overflow: hidden;
|
|
2156
2013
|
}
|
|
2157
|
-
.ps-tryon-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
.ps-tryon-
|
|
2161
|
-
|
|
2014
|
+
.ps-tryon-sizing-product-img {
|
|
2015
|
+
width: 100%; height: 100%; object-fit: cover; object-position: top;
|
|
2016
|
+
}
|
|
2017
|
+
.ps-tryon-sizing-form-col {
|
|
2018
|
+
display: flex; flex-direction: column; justify-content: center;
|
|
2019
|
+
padding: clamp(8px, 0.5vw, 14px) 0;
|
|
2020
|
+
}
|
|
2021
|
+
.ps-tryon-sf-title {
|
|
2022
|
+
font-size: clamp(18px, 1.3vw, 24px); font-weight: 700; color: #fff;
|
|
2023
|
+
margin: 0 0 clamp(14px, 1vw, 20px); letter-spacing: -0.01em;
|
|
2024
|
+
}
|
|
2025
|
+
.ps-tryon-sf-unit-tabs {
|
|
2026
|
+
display: flex; border-bottom: 1.5px solid #333; margin-bottom: clamp(14px, 1vw, 20px);
|
|
2027
|
+
}
|
|
2028
|
+
.ps-tryon-sf-unit-tab {
|
|
2029
|
+
background: none; border: none; padding: clamp(6px, 0.4vw, 10px) clamp(12px, 0.8vw, 16px);
|
|
2030
|
+
font-size: clamp(12px, 0.8vw, 14px); font-weight: 600; color: #666; cursor: pointer;
|
|
2031
|
+
font-family: inherit; transition: all 0.2s; border-bottom: 2px solid transparent;
|
|
2032
|
+
margin-bottom: -1.5px;
|
|
2033
|
+
}
|
|
2034
|
+
.ps-tryon-sf-unit-tab:hover { color: #999; }
|
|
2035
|
+
.ps-tryon-sf-unit-tab.ps-active { color: #fff; border-bottom-color: #bb945c; }
|
|
2036
|
+
|
|
2037
|
+
.ps-tryon-sf-profile-bar { margin-bottom: clamp(10px, 0.7vw, 14px); }
|
|
2038
|
+
.ps-tryon-sf-profile-select {
|
|
2039
|
+
width: 100%; padding: clamp(6px, 0.4vw, 8px); background: #1a1b1a; color: #ccc;
|
|
2040
|
+
border: 1px solid #333; border-radius: clamp(6px, 0.4vw, 8px);
|
|
2041
|
+
font-size: clamp(11px, 0.75vw, 13px); font-family: inherit; cursor: pointer;
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
.ps-tryon-sf-fields {
|
|
2045
|
+
display: flex; flex-direction: column; gap: clamp(16px, 1.1vw, 22px);
|
|
2046
|
+
flex: 1;
|
|
2047
|
+
}
|
|
2048
|
+
.ps-tryon-sf-row {
|
|
2049
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
2050
|
+
border-bottom: 1px solid #2a2a2a; padding-bottom: clamp(10px, 0.7vw, 14px);
|
|
2051
|
+
}
|
|
2052
|
+
.ps-tryon-sf-label {
|
|
2053
|
+
font-size: clamp(12px, 0.85vw, 15px); font-weight: 600; color: #ccc;
|
|
2054
|
+
letter-spacing: 0.04em; flex-shrink: 0;
|
|
2055
|
+
}
|
|
2056
|
+
.ps-tryon-sf-input-wrap { flex: 1; display: flex; justify-content: flex-end; }
|
|
2057
|
+
.ps-tryon-sf-inline { display: flex; align-items: center; gap: clamp(6px, 0.4vw, 10px); }
|
|
2058
|
+
.ps-tryon-sf-ft-group { display: flex; align-items: center; gap: clamp(4px, 0.3vw, 8px); }
|
|
2059
|
+
.ps-tryon-sf-input {
|
|
2060
|
+
background: transparent; border: none; border-bottom: 1.5px solid #444;
|
|
2061
|
+
color: #fff; font-size: clamp(14px, 1vw, 17px); font-family: inherit;
|
|
2062
|
+
padding: clamp(4px, 0.3vw, 6px) 0; width: clamp(50px, 4vw, 80px);
|
|
2063
|
+
text-align: center; outline: none; transition: border-color 0.2s;
|
|
2064
|
+
}
|
|
2065
|
+
.ps-tryon-sf-input:focus { border-bottom-color: #bb945c; }
|
|
2066
|
+
.ps-tryon-sf-input::placeholder { color: #555; }
|
|
2067
|
+
.ps-tryon-sf-input::-webkit-outer-spin-button,
|
|
2068
|
+
.ps-tryon-sf-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
|
|
2069
|
+
.ps-tryon-sf-unit {
|
|
2070
|
+
font-size: clamp(11px, 0.75vw, 13px); color: #666; font-weight: 500;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
.ps-tryon-sf-optional { margin-top: clamp(4px, 0.3vw, 6px); }
|
|
2074
|
+
.ps-tryon-sf-optional-toggle {
|
|
2075
|
+
font-size: clamp(11px, 0.75vw, 13px); color: #666; cursor: pointer;
|
|
2076
|
+
font-family: inherit; list-style: none;
|
|
2077
|
+
}
|
|
2078
|
+
.ps-tryon-sf-optional-toggle:hover { color: #999; }
|
|
2079
|
+
.ps-tryon-sf-optional-toggle::-webkit-details-marker { display: none; }
|
|
2080
|
+
.ps-tryon-sf-optional-fields { display: flex; flex-direction: column; gap: clamp(12px, 0.8vw, 16px); padding-top: clamp(10px, 0.7vw, 14px); }
|
|
2081
|
+
|
|
2082
|
+
.ps-tryon-sf-switch { margin-top: clamp(12px, 0.8vw, 16px); text-align: center; }
|
|
2083
|
+
.ps-tryon-sf-switch-btn {
|
|
2084
|
+
background: none; border: none; color: #bb945c; font-size: clamp(12px, 0.8vw, 14px);
|
|
2085
|
+
font-weight: 600; cursor: pointer; font-family: inherit;
|
|
2086
|
+
display: inline-flex; align-items: center; gap: clamp(4px, 0.3vw, 6px);
|
|
2087
|
+
transition: color 0.2s;
|
|
2088
|
+
}
|
|
2089
|
+
.ps-tryon-sf-switch-btn:hover { color: #d6ba7d; }
|
|
2090
|
+
.ps-tryon-sf-switch-btn svg { stroke: currentColor; width: clamp(12px, 0.8vw, 14px); height: clamp(12px, 0.8vw, 14px); }
|
|
2091
|
+
|
|
2092
|
+
.ps-tryon-sf-next {
|
|
2093
|
+
margin-top: clamp(14px, 1vw, 20px); align-self: flex-end;
|
|
2094
|
+
padding: clamp(10px, 0.7vw, 14px) clamp(28px, 2vw, 40px);
|
|
2095
|
+
background: #bb945c; color: #111; border: none;
|
|
2096
|
+
border-radius: clamp(8px, 0.6vw, 12px); font-size: clamp(14px, 0.95vw, 16px);
|
|
2097
|
+
font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: inherit;
|
|
2098
|
+
}
|
|
2099
|
+
.ps-tryon-sf-next:hover { background: #a07d4e; transform: translateY(-1px); }
|
|
2100
|
+
|
|
2101
|
+
/* Mobile: stack vertically */
|
|
2102
|
+
@media (max-width: 600px) {
|
|
2103
|
+
.ps-tryon-sizing-split { grid-template-columns: 1fr; }
|
|
2104
|
+
.ps-tryon-sizing-img-col { max-height: 200px; }
|
|
2105
|
+
.ps-tryon-sf-next { width: 100%; text-align: center; display: flex; justify-content: center; }
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
/* Keep old class names for backwards compat */
|
|
2109
|
+
.ps-tryon-section-title { font-size: clamp(14px, 0.95vw, 18px); font-weight: 600; color: #fff; margin: 0 0 clamp(12px, 0.8vw, 16px); }
|
|
2110
|
+
.ps-tryon-sg-checking { display: flex; flex-direction: column; align-items: center; padding: clamp(30px, 2.5vw, 50px) clamp(15px, 1vw, 25px); text-align: center; }
|
|
2111
|
+
.ps-tryon-sg-checking-icon { color: #bb945c; margin-bottom: clamp(12px, 0.8vw, 16px); animation: ps-pulse-ruler 1.5s ease-in-out infinite; }
|
|
2162
2112
|
.ps-tryon-sg-checking-icon svg { stroke: currentColor; fill: none; }
|
|
2163
2113
|
@keyframes ps-pulse-ruler { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.15); opacity: 1; } }
|
|
2164
|
-
.ps-tryon-sg-checking-bar-wrap { width:
|
|
2114
|
+
.ps-tryon-sg-checking-bar-wrap { width: clamp(120px, 9vw, 180px); height: 4px; background: #333; border-radius: 2px; overflow: hidden; margin-bottom: clamp(14px, 1vw, 20px); }
|
|
2165
2115
|
.ps-tryon-sg-checking-bar { height: 100%; width: 40%; background: linear-gradient(90deg, #bb945c, #d6ba7d); border-radius: 2px; animation: ps-sg-bar 1.5s ease-in-out infinite; }
|
|
2166
2116
|
@keyframes ps-sg-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }
|
|
2167
|
-
.ps-tryon-sg-checking .ps-tryon-section-title { margin-bottom: 0.
|
|
2168
|
-
.ps-tryon-sg-checking-sub { font-size: 0.
|
|
2117
|
+
.ps-tryon-sg-checking .ps-tryon-section-title { margin-bottom: clamp(4px, 0.3vw, 6px); }
|
|
2118
|
+
.ps-tryon-sg-checking-sub { font-size: clamp(11px, 0.75vw, 13px); color: #999; margin: 0; }
|
|
2169
2119
|
|
|
2170
2120
|
/* Back button */
|
|
2171
|
-
.ps-tryon-back { display: flex; align-items: center; gap: 0.
|
|
2121
|
+
.ps-tryon-back { display: flex; align-items: center; gap: clamp(4px, 0.3vw, 6px); background: none; border: none; color: #999; font-size: clamp(12px, 0.8vw, 14px); cursor: pointer; padding: 0; margin-bottom: clamp(10px, 0.7vw, 14px); font-family: inherit; transition: color 0.2s; }
|
|
2172
2122
|
.ps-tryon-back:hover { color: #fff; }
|
|
2173
2123
|
.ps-tryon-back svg { stroke: currentColor; fill: none; }
|
|
2174
2124
|
|
|
2175
|
-
/* Sizing form */
|
|
2176
|
-
.ps-tryon-sizing-form { display: flex; flex-direction: column; gap: 0.
|
|
2125
|
+
/* Sizing form (legacy — redirect to split view) */
|
|
2126
|
+
.ps-tryon-sizing-form { display: flex; flex-direction: column; gap: clamp(10px, 0.7vw, 14px); }
|
|
2177
2127
|
.ps-tryon-input-row { display: flex; align-items: center; gap: 0.52vw; }
|
|
2178
2128
|
.ps-tryon-input-row label { font-size: 0.68vw; font-weight: 500; color: #ccc; min-width: 4.7vw; flex-shrink: 0; }
|
|
2179
2129
|
.ps-tryon-input-row input {
|