:root {
  --frame: #0f0f12;
  --shell: #ffffff;
  --ink: #111827;
  --muted: rgba(17, 24, 39, 0.55);
  --muted2: rgba(17, 24, 39, 0.38);
  --border: rgba(17, 24, 39, 0.18);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.55);

  --red: #e54b4b;
  --coral: #ff6b6b;
  --pink: #ff2d6f;
  --blue: #2f9bff;

  --radius: 28px;
  --radius2: 20px;
  --ring: 0 0 0 3px rgba(47, 155, 255, 0.25);

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --fun: "Comic Sans MS", "Segoe Print", "Bradley Hand", "Marker Felt", cursive;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --phone-w: 390px;
  --phone-h: 760px;
  --shell-fit-w: 390px;
  --shell-fit-h: 760px;
  --embed-scale: 1;
  --embed-fit: 1;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(900px 540px at 20% 10%, rgba(255, 45, 111, 0.18), transparent 62%),
    radial-gradient(800px 520px at 80% 22%, rgba(47, 155, 255, 0.16), transparent 60%),
    radial-gradient(900px 520px at 50% 95%, rgba(229, 75, 75, 0.14), transparent 64%),
    linear-gradient(180deg, #0c0c0f, var(--frame));
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  padding: 10px;
  overflow: auto;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }

.shell {
  width: var(--shell-fit-w);
  height: var(--shell-fit-h);
  aspect-ratio: 390 / 760;
  min-height: 0;
  border-radius: var(--radius);
  background: var(--shell);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (max-height: 820px) {
  body { align-items: flex-start; }
  .shell { margin-block: 10px; }
}

/* Embedded preview mode (projects viewing window): keep a fixed phone frame. */
body.embedded {
  padding: 0;
  overflow: hidden;
  background: #e5e5e5;
  display: grid;
  place-items: center;
}

body.embedded .shell {
  width: calc(var(--phone-w) * var(--embed-fit, 1));
  height: calc(var(--phone-h) * var(--embed-fit, 1));
  aspect-ratio: 390 / 760;
  border-radius: var(--radius);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.34);
  transform: none;
}

.content {
  padding: 22px;
  padding-bottom: 98px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.topbar {
  padding: 18px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo {
  width: 38px;
  height: 38px;
  border-radius: 16px;
  background: rgba(255, 107, 107, 0.16);
  border: 2px solid rgba(255, 107, 107, 0.35);
  display: grid;
  place-items: center;
}

.logo svg { width: 22px; height: 22px; fill: rgba(17, 24, 39, 0.75); }

.brand h1 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand p {
  margin: 3px 0 0;
  font-size: 10px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--muted2);
}

.pill {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255,255,255,0.85);
  white-space: nowrap;
}

.card {
  margin-top: 16px;
  border-radius: var(--radius2);
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: #fff;
  box-shadow: 0 22px 60px rgba(17, 24, 39, 0.16);
  padding: 18px;
}

.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }

.btn {
  width: 100%;
  border: 2px solid rgba(17, 24, 39, 0.75);
  background: var(--coral);
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--fun);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.02); box-shadow: 0 12px 26px rgba(17,24,39,0.12); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary { background: var(--coral); }
.btn.ghost {
  background: #fff;
  color: var(--coral);
  border-color: var(--coral);
}
.btn.danger {
  background: #ef4444;
  border-color: rgba(17, 24, 39, 0.75);
}
.btn.inline { width: auto; padding: 10px 14px; font-size: 16px; border-radius: 12px; }

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.micro {
  color: var(--muted2);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.45;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
  color: rgba(17,24,39,0.55);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.divider::before, .divider::after {
  content: "";
  height: 1px;
  background: rgba(17,24,39,0.14);
}

.field { display: grid; gap: 8px; }
.field label {
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: lowercase;
  color: rgba(17,24,39,0.60);
  font-weight: 700;
}
.input, select.input, textarea.input {
  width: 100%;
  border-radius: 10px;
  border: 2px solid rgba(17, 24, 39, 0.55);
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
}
.input::placeholder { color: rgba(17, 24, 39, 0.35); }
.input:focus { box-shadow: var(--ring); border-color: rgba(47, 155, 255, 0.85); }
textarea.input { resize: vertical; min-height: 96px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  border-radius: 10px;
  border: 2px solid rgba(255, 107, 107, 0.78);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  font-weight: 900;
  font-family: var(--fun);
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}
.chip:hover { transform: translateY(-1px); }
.chip[aria-pressed="true"] {
  background: var(--coral);
  color: #fff;
}

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.products {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.product {
  border-radius: 18px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.10);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.product:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(17, 24, 39, 0.12); }
.product .thumb {
  height: 112px;
  background:
    radial-gradient(220px 140px at 30% 20%, rgba(229,75,75,0.16), transparent 60%),
    radial-gradient(240px 160px at 74% 70%, rgba(47,155,255,0.14), transparent 60%),
    #fff;
}
.product .meta { padding: 10px 10px 12px; }
.product .title { font-weight: 900; font-size: 12px; margin: 0; color: rgba(17,24,39,0.88); }
.product .sub { margin: 6px 0 0; color: rgba(17,24,39,0.55); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }

.kv {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  align-items: center;
}
.kv .k { color: rgba(17,24,39,0.55); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.kv .v { text-align: right; font-family: var(--mono); font-size: 11px; color: rgba(17,24,39,0.85); }

.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 12px 14px 16px;
  border-top: 1px solid rgba(17, 24, 39, 0.10);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
}
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tab {
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: #fff;
  padding: 10px 8px;
  text-align: center;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}
.tab:hover { transform: translateY(-1px); border-color: rgba(255,107,107,0.35); background: rgba(255,107,107,0.06); }
.tab[aria-current="page"] { background: rgba(255,107,107,0.12); border-color: rgba(255,107,107,0.40); }
.tab .t { font-size: 9px; letter-spacing: 0.20em; text-transform: uppercase; font-weight: 900; color: rgba(17,24,39,0.68); }

.toast-area {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: grid;
  gap: 10px;
  z-index: 999;
}
.toast {
  width: min(360px, calc(100vw - 36px));
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(17,24,39,0.16);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
  animation: rise 160ms ease-out;
}
.toast .tt { font-size: 12px; font-weight: 900; color: rgba(17,24,39,0.86); font-family: var(--fun); }
.toast .tm { margin-top: 6px; font-size: 13px; color: rgba(17,24,39,0.72); line-height: 1.45; }
.toast[data-kind="success"] { border-color: rgba(34, 197, 94, 0.42); }
.toast[data-kind="danger"] { border-color: rgba(239, 68, 68, 0.42); }
.toast[data-kind="warn"] { border-color: rgba(234, 179, 8, 0.42); }

@keyframes rise {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.hidden { display: none !important; }

/* ---------- PDF-inspired auth screens ---------- */
.splash {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 26px 20px 0;
  position: relative;
}
.splash.is-fading {
  animation: splashFadeOut 520ms ease forwards;
}
.splash-hit { position: absolute; inset: 0; }
.splash-title {
  width: min(240px, 78%);
  height: auto;
  display: block;
  margin-top: 4px;
}
.splash-hero {
  width: min(240px, 62%);
  height: auto;
  display: block;
  margin-top: 92px;
}
.splash-waves {
  width: 100%;
  height: auto;
  display: block;
  margin-top: auto;
}
.splash-hint {
  position: absolute;
  bottom: 88px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(17,24,39,0.30);
}

@keyframes splashFadeOut {
  from { opacity: 1; }
  to { opacity: 0; transform: scale(0.985); }
}

.auth-header {
  height: 268px;
  background: var(--red);
  border-bottom-left-radius: 44px;
  border-bottom-right-radius: 44px;
}
.auth-header.is-signup {
  background-color: var(--red);
  background-image: url("media/title-signup.png");
  background-repeat: no-repeat;
  background-position: calc(50% + 48px) -48px;
  background-size: clamp(324px, 98%, 404px) auto;
}
.auth-header.is-login {
  background-color: var(--red);
  background-image: url("media/title-login.png");
  background-repeat: no-repeat;
  background-position: calc(50% + 48px) -48px;
  background-size: clamp(324px, 98%, 404px) auto;
}

.auth-panel {
  padding: 0 18px 26px;
  margin-top: -84px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.auth-card {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(17, 24, 39, 0.18);
  overflow: hidden;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #fff;
}

.auth-tab {
  display: block;
  padding: 18px 0 14px;
  text-align: center;
  font-weight: 800;
  color: rgba(17,24,39,0.55);
  position: relative;
  background: #fff;
}
.auth-tab[aria-current="page"] { color: rgba(17,24,39,0.88); }
.auth-tab[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0;
  height: 4px;
  background: var(--blue);
  border-radius: 999px;
}

.auth-form { padding: 18px; }
.auth-form .field label { text-transform: none; letter-spacing: 0.04em; }
.auth-form .input { border-width: 1.8px; }

.auth-bottom {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  color: rgba(17,24,39,0.60);
}
.auth-bottom a { color: var(--blue); font-weight: 700; }

.auth-subline {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 6px;
  font-size: 12px;
  color: rgba(17,24,39,0.58);
  margin-top: -2px;
}
.auth-subline a { color: var(--blue); font-weight: 800; }

.btn-outline {
  width: 100%;
  border-radius: 12px;
  border: 2px solid rgba(255, 107, 107, 0.78);
  background: #fff;
  color: rgba(255, 107, 107, 0.98);
  padding: 12px 14px;
  font-family: var(--fun);
  font-weight: 900;
  font-size: 17px;
  cursor: pointer;
}
.btn-outline:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(17,24,39,0.10); }
.btn-outline:active { transform: translateY(0); }
.btn:disabled,
.btn-outline:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: none;
}
.btn:disabled:hover,
.btn-outline:disabled:hover {
  transform: none;
  box-shadow: none;
}

.simple {
  padding: 30px 22px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.simple .title-img { width: min(280px, 90%); height: auto; display: block; }
.simple .hero-img { width: min(260px, 72%); height: auto; display: block; }
.simple .desc { margin: 0; font-size: 13px; line-height: 1.55; color: rgba(17,24,39,0.62); max-width: 290px; }
.simple .subdesc { margin: 0; font-size: 12px; color: rgba(17,24,39,0.36); max-width: 290px; }
.simple .link { font-size: 12px; color: var(--blue); font-weight: 800; }

.form-title-img {
  width: min(320px, 92%);
  height: auto;
  display: block;
  margin: 0 auto 14px;
}

.option-row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

.pick {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fun);
  font-weight: 900;
  font-size: 14px;
  color: rgba(17,24,39,0.88);
  cursor: pointer;
}
.pick .box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid rgba(255, 107, 107, 0.78);
  background: #fff;
  display: inline-block;
}
.pick[aria-pressed="true"] .box {
  background: var(--coral);
  box-shadow: inset 0 0 0 3px #fff;
}

.size-chip {
  width: 42px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fun);
  font-weight: 900;
  font-size: 14px;
  color: rgba(17,24,39,0.88);
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--coral);
}

.nowrap { white-space: nowrap; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- App shell (check.png style) ---------- */
.screen {
  padding: 18px;
  padding-bottom: 110px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.appbar {
  height: 62px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.appbar-title {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: rgba(17, 24, 39, 0.86);
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.icon-btn svg { width: 22px; height: 22px; color: rgba(17, 24, 39, 0.82); }
.icon-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(17,24,39,0.12); border-color: rgba(255, 107, 107, 0.30); }
.icon-btn:active { transform: translateY(0); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 2px solid rgba(255, 107, 107, 0.40);
  background: radial-gradient(24px 24px at 30% 30%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, rgba(255, 107, 107, 0.30), rgba(47, 155, 255, 0.22));
  display: grid;
  place-items: center;
  color: rgba(17,24,39,0.88);
  font-weight: 900;
  font-size: 12px;
  text-decoration: none;
}
.avatar:hover { text-decoration: none; }

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 25;
}
.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(320px, 82%);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(17, 24, 39, 0.10);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.26);
  transform: translateX(-110%);
  transition: transform 240ms ease;
  z-index: 30;
  display: flex;
  flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }

.drawer-head {
  padding: 16px 14px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.10);
}
.drawer-title {
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(17,24,39,0.86);
}
.drawer-sub {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(17,24,39,0.50);
}

.drawer-body {
  padding: 14px;
  overflow: auto;
}
.drawer-section { margin-top: 14px; }
.drawer-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(17,24,39,0.55);
  font-weight: 900;
}
.drawer-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drawer-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(17,24,39,0.10);
  background: rgba(255, 255, 255, 0.9);
  color: rgba(17,24,39,0.82);
  font-weight: 800;
  text-decoration: none;
  margin-top: 10px;
}
.drawer-link:hover { text-decoration: none; border-color: rgba(255, 107, 107, 0.30); transform: translateY(-1px); }

.drawer-input {
  margin-top: 10px;
  width: 100%;
  border-radius: 14px;
  border: 2px solid rgba(17, 24, 39, 0.18);
  background: #fff;
  padding: 12px 14px;
  outline: none;
}
.drawer-input:focus { box-shadow: var(--ring); border-color: rgba(47, 155, 255, 0.85); }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.home-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Override product cards to match the home screenshot overlay style */
.home-grid .product {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.12);
}
.home-grid .product:hover { transform: translateY(-2px); }

.home-grid .product .thumb {
  height: 150px;
  background:
    radial-gradient(220px 140px at 30% 20%, rgba(229,75,75,0.18), transparent 60%),
    radial-gradient(240px 160px at 74% 70%, rgba(47,155,255,0.16), transparent 60%),
    #fff;
}
.home-grid .product .meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 10px 12px;
  background: rgba(229, 75, 75, 0.72);
  color: #fff;
  border-top: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
}
.home-grid .product .title { color: #fff; font-size: 12px; margin: 0; font-weight: 900; }
.home-grid .product .sub { margin: 6px 0 0; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.92); }

.home-grid .product .product-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.85);
  color: rgba(17, 24, 39, 0.52);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.96);
  transition: opacity 140ms ease, transform 140ms ease, background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.home-grid .product .product-fav svg {
  width: 16px;
  height: 16px;
}

.home-grid .product .product-fav path {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.9;
}

.home-grid .product:hover .product-fav,
.home-grid .product:focus-within .product-fav,
.home-grid .product .product-fav.is-on {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.home-grid .product .product-fav.is-on {
  background: rgba(229, 75, 75, 0.96);
  border-color: rgba(229, 75, 75, 0.98);
  color: #fff;
}

.home-grid .product .product-fav.is-on path {
  fill: currentColor;
  stroke: currentColor;
}

@media (hover: none) {
  .home-grid .product .product-fav {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  padding: 14px 18px 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 10px;
}

.nav-btn,
.nav-fab {
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: rgba(255, 255, 255, 0.92);
  color: rgba(17, 24, 39, 0.55);
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.nav-btn:hover,
.nav-fab:hover { transform: translateY(-1px); box-shadow: 0 12px 22px rgba(17, 24, 39, 0.12); border-color: rgba(255, 107, 107, 0.30); text-decoration: none; }
.nav-btn svg { width: 20px; height: 20px; fill: currentColor; }

.nav-btn[aria-current="page"] { color: rgba(47, 155, 255, 0.95); border-color: rgba(47, 155, 255, 0.26); background: rgba(47, 155, 255, 0.06); }

.nav-fab {
  height: 56px;
  width: 56px;
  justify-self: center;
  align-self: center;
  border-radius: 999px;
  background: var(--blue);
  border-color: rgba(47, 155, 255, 0.70);
  color: #fff;
  box-shadow: 0 18px 30px rgba(47, 155, 255, 0.35);
  transform: translateY(-10px);
}
.nav-fab svg { width: 22px; height: 22px; fill: currentColor; }
.nav-fab:hover { box-shadow: 0 22px 36px rgba(47, 155, 255, 0.42); }

/* ---------- Visual parity refinements ---------- */
.icon-btn.placeholder {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  visibility: hidden;
}

.simple.login-mode {
  justify-content: flex-start;
  padding-top: 28px;
  gap: 16px;
}

.simple.login-mode .hero-img {
  width: min(280px, 80%);
  margin-top: 14px;
}

.simple .desc.scan-text {
  margin-top: 16px;
  font-size: 24px;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: rgba(17, 24, 39, 0.82);
  font-weight: 900;
}

.simple.login-mode .btn {
  margin-top: 16px;
  min-width: 110px;
}

/* ---------- Product details ---------- */
.product-detail {
  margin-top: 0;
  border-radius: 18px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: #f2f2f3;
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.10);
  padding: 12px;
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.product-gallery-item {
  border-radius: 10px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #fff center/cover no-repeat;
  aspect-ratio: 3 / 4;
}

.product-summary-row {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.product-price {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: rgba(17, 24, 39, 0.90);
}

.product-stock {
  font-size: 14px;
  font-weight: 800;
  color: rgba(229, 75, 75, 0.86);
}

.product-description {
  margin-top: 12px;
}

.product-description p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.56;
  color: rgba(17, 24, 39, 0.74);
}

.product-section {
  margin-top: 16px;
}

.product-section-title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(17, 24, 39, 0.86);
}

.choice-row {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.opt-chip {
  width: 43px;
  height: 39px;
  border-radius: 4px;
  border: 1px solid rgba(17, 24, 39, 0.15);
  background: rgba(17, 24, 39, 0.07);
  color: rgba(17, 24, 39, 0.80);
  font-weight: 900;
  cursor: pointer;
}

.opt-chip.is-on {
  border-color: rgba(229, 75, 75, 0.85);
  background: var(--red);
  color: #fff;
}

.choice-row.colors {
  gap: 12px;
}

.color-dot {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 2px solid rgba(17, 24, 39, 0.18);
  background: var(--dot, #c7c7c7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.color-dot.is-on {
  border-color: rgba(17, 24, 39, 0.85);
  box-shadow: 0 0 0 3px rgba(47, 155, 255, 0.18);
}

.product-get {
  margin-top: 18px;
  border-radius: 14px;
  width: 100%;
  height: 56px;
  font-size: 20px;
}

/* ---------- Checkout look ---------- */
.payment-sheet {
  margin-top: 0;
  border-radius: 18px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: #eef1f4;
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.10);
  padding: 20px 16px;
  position: relative;
  overflow: hidden;
}

.payment-sheet::before,
.payment-sheet::after {
  content: "";
  position: absolute;
  border: 2px solid rgba(17, 24, 39, 0.20);
  border-radius: 999px;
  width: 64px;
  height: 64px;
  opacity: 0.50;
}

.payment-sheet::before {
  top: -34px;
  left: -30px;
}

.payment-sheet::after {
  right: -34px;
  bottom: -34px;
}

.payment-title {
  text-align: center;
  margin-top: 8px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: rgba(17, 24, 39, 0.82);
  text-transform: uppercase;
}

.payment-title::after {
  content: "";
  display: block;
  width: 144px;
  height: 6px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: rgba(255, 45, 111, 0.35);
}

.payment-choices {
  margin: 24px 4px 0;
  display: grid;
  gap: 10px;
}

.payment-choice {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  font-size: 17px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(17, 24, 39, 0.84);
  cursor: pointer;
  justify-content: flex-start;
}

.payment-choice .dot {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid rgba(17, 24, 39, 0.18);
  background: #fff;
  flex: 0 0 auto;
}

.payment-choice.is-on {
  border-color: rgba(47, 155, 255, 0.26);
  background: rgba(255, 255, 255, 0.70);
}

.payment-choice.is-on .dot {
  border-color: rgba(229, 75, 75, 0.92);
  background: var(--red);
  box-shadow: inset 0 0 0 2px #fff;
}

.payment-extra {
  margin-top: 20px;
  border-top: 1px dashed rgba(17, 24, 39, 0.18);
  padding-top: 12px;
}

.payment-extra > summary {
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(17, 24, 39, 0.58);
  font-weight: 900;
}

.payment-extra > summary::-webkit-details-marker {
  display: none;
}

.payment-confirm {
  margin-top: 16px;
  border-radius: 999px;
  max-width: 150px;
  margin-inline: auto;
}

@media (max-width: 420px) {
  .product-price { font-size: 30px; }
  .product-stock { font-size: 14px; }
  .product-section-title { font-size: 14px; }
  .payment-title { font-size: 24px; letter-spacing: 0.22em; }
  .payment-choice { font-size: 17px; letter-spacing: 0.20em; }
}
