/* ================= Ocat vCard — Public card ================= */
:root {
  --theme: #6d4aff;
  --ink: #12101f;
  --ink-2: #4a4763;
  --muted: #8a87a3;
  --line: #eceaf4;
  --soft: color-mix(in srgb, var(--theme) 9%, white);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink); background: #f3f1fa; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }
.ico { display: inline-flex; line-height: 0; }
.ico svg { width: 1em; height: 1em; }

/* overflow: clip (not hidden) so the sticky card still works on desktop */
.page { position: relative; padding: 32px 16px 60px; overflow: clip; min-height: 100vh; }
.bg-blob {
  position: fixed; inset: -20% -10% auto; height: 70vh; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--theme) 35%, transparent), transparent);
  filter: blur(40px);
}

.card {
  position: relative; z-index: 1; max-width: 460px; margin: 0 auto; background: #fff; align-self: start;
  border-radius: 32px; overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(40, 20, 120, .35), 0 2px 6px rgba(0,0,0,.04);
  animation: rise .6s ease-out both;
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

.card__cover {
  height: 170px; position: relative;
  background:
    radial-gradient(circle at 15% 25%, rgba(255,255,255,.35), transparent 35%),
    radial-gradient(circle at 90% 80%, rgba(255,255,255,.2), transparent 30%),
    linear-gradient(135deg, var(--theme), color-mix(in srgb, var(--theme) 50%, #ff7a59));
}
.icon-btn {
  position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.22); color: #fff; font-size: 18px; display: grid; place-items: center;
  cursor: pointer; backdrop-filter: blur(8px); transition: background .2s;
}
.icon-btn:hover { background: rgba(255,255,255,.35); }

.card__head { text-align: center; padding: 0 28px; }
.avatar {
  width: 116px; height: 116px; margin: -58px auto 0; border-radius: 50%; position: relative;
  display: grid; place-items: center; overflow: hidden;
  font-size: 38px; font-weight: 800; color: var(--theme);
  background: linear-gradient(#fff, var(--soft)); border: 5px solid #fff;
  box-shadow: 0 14px 30px -12px rgba(40, 20, 120, .4);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.card__head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 14px; }
.role { color: var(--theme); font-weight: 600; font-size: 15px; margin-top: 4px; }
.bio { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; margin-top: 12px; }

.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 24px 22px 0; }
.action { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.action span {
  width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; font-size: 21px;
  background: var(--soft); color: var(--theme); transition: transform .2s, background .2s, color .2s;
}
.action:hover span { transform: translateY(-3px); background: var(--theme); color: #fff; }

.save-wrap { padding: 20px 22px 4px; }
.btn-save {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; border: 0; border-radius: 18px; cursor: pointer;
  background: var(--ink); color: #fff; font: inherit; font-weight: 700; font-size: 16px;
  box-shadow: 0 14px 28px -14px rgba(18,16,31,.7); transition: transform .2s;
}
.btn-save:hover { transform: translateY(-2px); }

.block { padding: 22px 22px 0; }
.block h2 { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }

.list { display: grid; gap: 10px; font-style: normal; }
.block[hidden] { display: none; }
.item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; transition: border-color .2s, background .2s; }
a.item:hover { border-color: color-mix(in srgb, var(--theme) 40%, white); background: #fcfbff; }
.item__icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--theme); font-size: 17px; }
.item__text { font-size: 14.5px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.item__text small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }

.services { display: grid; gap: 10px; }
.service { display: flex; gap: 14px; padding: 14px; border-radius: 16px; background: #faf9fd; }
.service > span { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--theme); font-size: 17px; box-shadow: 0 2px 6px rgba(0,0,0,.05); }
.service b { font-size: 15px; }
.service p { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }

/* Services / Products tiles */
.block h2 .count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 6px;
  border-radius: 999px; background: var(--soft); color: var(--theme); font-size: 11.5px; letter-spacing: 0; vertical-align: 1px;
}
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 14px 14px;
  border-radius: 18px; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 10%, white), #fff 70%);
  border: 1px solid color-mix(in srgb, var(--c) 18%, white);
  transition: transform .2s, box-shadow .2s;
}
.tile::after {
  content: ''; position: absolute; width: 90px; height: 90px; right: -30px; top: -30px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 14%, transparent);
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -16px color-mix(in srgb, var(--c) 70%, transparent); }
.tile__icon {
  position: relative; z-index: 1; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: var(--c); color: #fff; font-size: 19px; margin-bottom: 4px;
  box-shadow: 0 8px 16px -8px var(--c);
}
.tile h3 { margin: 0; font-size: 14.5px; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; }
.tile p { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.tile__cta {
  margin-top: auto; padding-top: 6px; align-self: flex-start; font-size: 12.5px; font-weight: 700; color: var(--c);
}
.tile__cta span { display: inline-block; transition: transform .2s; }
.tile:hover .tile__cta span { transform: translateX(3px); }
/* Odd count: let the last tile span the full row */
.tiles .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 360px) { .tiles { grid-template-columns: 1fr; } }

/* Business Details: vCard.biztxt shown exactly as typed (line breaks and spacing kept) */
.bizdetails {
  position: relative; display: flex; gap: 14px; padding: 18px 18px 18px 20px; border-radius: 20px; overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, #ff7a59 12%, transparent), transparent 45%),
    linear-gradient(160deg, var(--soft), #fff 70%);
  border: 1px solid color-mix(in srgb, var(--theme) 14%, white);
}
.bizdetails::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(var(--theme), #ff7a59);
}
.bizdetails__icon {
  flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 18px;
  background: linear-gradient(135deg, var(--theme), color-mix(in srgb, var(--theme) 50%, #ff7a59)); color: #fff;
  box-shadow: 0 10px 20px -10px color-mix(in srgb, var(--theme) 80%, transparent);
}
.bizdetails__text {
  flex: 1; min-width: 0; padding-top: 2px;
  font-size: 15px; line-height: 1.75; color: var(--ink-2);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
@media (max-width: 360px) { .bizdetails { flex-direction: column; } }

.social { display: flex; gap: 10px; flex-wrap: wrap; }
.social a {
  width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-size: 20px;
  border: 1px solid var(--line); color: var(--ink-2); transition: all .2s;
}
.social a:hover { background: var(--theme); border-color: var(--theme); color: #fff; transform: translateY(-3px); }

.block--qr { display: flex; align-items: center; gap: 18px; margin: 22px 22px 0; padding: 18px; border-radius: 20px; background: var(--soft); }
.block--qr h2 { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 17px; margin-bottom: 4px; }
.qrbox { flex: none; padding: 8px; background: #fff; border-radius: 14px; line-height: 0; }
.qrbox img, .qrbox canvas { width: 112px; height: 112px; }
.muted { color: var(--ink-2); font-size: 13.5px; }
.url { margin-top: 8px; font-weight: 700; color: var(--theme); font-size: 14px; overflow-wrap: anywhere; }

.card__foot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 22px 30px; font-size: 13px; color: var(--muted); }
.card__foot b { color: var(--ink); }
.brand-mark {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; vertical-align: -4px;
  background: linear-gradient(135deg, #6d4aff, #b36bff 55%, #ff7a59); color: #fff; font-weight: 800; font-size: 13px; padding-bottom: 2px;
}
.get { color: var(--theme); font-weight: 700; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 600;
  transition: all .3s; z-index: 10; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ================= Layout: card + Ocat Ads ================= */
.layout { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; display: grid; gap: 28px; }
.layout .card { width: 100%; }
.layout > *, .ads__grid > * { min-width: 0; }

/* Teaser inside the card (mobile) */
.ads-hint {
  display: flex; align-items: center; gap: 12px; margin: 14px 22px 0; padding: 12px 14px;
  border-radius: 16px; background: linear-gradient(135deg, #fff4ef, var(--soft));
  border: 1px dashed color-mix(in srgb, var(--theme) 35%, white);
}
.ads-hint[hidden] { display: none; }
.ads-hint__icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #ff7a59; color: #fff; font-size: 18px; }
.ads-hint__text { flex: 1; font-size: 14px; }
.ads-hint__text small { display: block; color: var(--muted); font-size: 12px; }
.ads-hint__arrow { font-size: 18px; color: var(--theme); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }

/* Business Network button (vcardshow.aspx -> ocat.biz/<name>/businessnetwork).
   It sits beside Save Contact in .save-wrap: same height, even gap; the two stack on narrow phones. */
.save-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.save-wrap > .btn-save, .save-wrap > .btn-net { flex: 1 1 170px; width: auto; min-width: 0; }
.btn-net {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; border-radius: 18px; white-space: nowrap;
  background: var(--soft); color: var(--theme); font-weight: 700; font-size: 16px; line-height: normal;
  transition: background .2s, color .2s, transform .2s;
}
.btn-net:hover { background: var(--theme); color: #fff; transform: translateY(-2px); }

/* Ads section */
.ads { padding: 8px 0 0; scroll-margin-top: 16px; }
.ads__head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.ads__eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #ff7a59; }
.ads__head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.ads__note { margin-top: 18px; text-align: center; font-size: 12.5px; color: var(--muted); }
.ads__note b { color: var(--ink-2); }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; font: inherit; font-size: 13.5px; font-weight: 600; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); transition: all .2s;
}
.chip:hover { border-color: var(--theme); color: var(--theme); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

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

.ad {
  display: flex; flex-direction: column; background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: 0 18px 40px -24px rgba(40, 20, 120, .35), 0 1px 3px rgba(0,0,0,.04);
  transition: transform .25s, box-shadow .25s; animation: rise .5s ease-out both;
}
.ad:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -24px rgba(40, 20, 120, .45); }
.ad__media {
  position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.35), transparent 40%),
    linear-gradient(135deg, var(--c1), var(--c2));
}
.ad__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
a.ad__media { cursor: pointer; }
a.ad__media:hover img { transform: scale(1.04); }
.ad__title { color: inherit; }
.ad__title:hover { color: var(--theme); }
.ad__art { font-size: 64px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.25)); }
.ad__badge {
  position: absolute; top: 14px; left: 14px; padding: 6px 12px; border-radius: 999px;
  background: #fff; color: var(--ink); font-size: 12.5px; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 6px 14px -6px rgba(0,0,0,.35);
}
.ad__label {
  position: absolute; top: 14px; right: 14px; padding: 3px 8px; border-radius: 6px;
  background: rgba(0,0,0,.35); color: #fff; font-size: 11px; font-weight: 700; backdrop-filter: blur(6px);
}
.ad__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.ad__cat { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--theme); }
.ad__body h3 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.ad__body p { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.ad__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.ad__price { font-size: 17px; font-weight: 800; }
.ad__price s { font-size: 13.5px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.ad__ends { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: #e5484d; background: #fff1f1; padding: 4px 10px; border-radius: 999px; }
.ad__cta {
  margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border-radius: 14px; font-weight: 700; font-size: 14.5px;
  background: var(--soft); color: var(--theme); transition: background .2s, color .2s;
}
.ad__cta:hover { background: var(--theme); color: #fff; }
.ad__cta--whatsapp { background: #e7f9ee; color: #128c4a; }
.ad__cta--whatsapp:hover { background: #25d366; color: #fff; }

.ad--featured .ad__body h3 { font-size: 21px; }
.ad--featured .ad__cta { background: var(--ink); color: #fff; }
.ad--featured .ad__cta:hover { background: var(--theme); }

.ad--skeleton { min-height: 280px; background: linear-gradient(100deg, #f1eff8 30%, #f9f8fd 50%, #f1eff8 70%) 0 0 / 200% 100%; animation: shimmer 1.3s linear infinite; box-shadow: none; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Floating "offers" pill (mobile) */
.offers-pill {
  position: fixed; left: 50%; bottom: 20px; z-index: 9; transform: translate(-50%, 90px);
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
  background: #ff7a59; color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 14px 30px -10px rgba(255, 122, 89, .8); transition: transform .35s;
}
.offers-pill.show { transform: translate(-50%, 0); }

/* Tablet: 2-column ad grid under the card */
@media (min-width: 640px) {
  .layout { max-width: 760px; }
  .layout .card { max-width: 460px; }
  .ads { padding: 8px 0 0; }
  .ads__grid { grid-template-columns: repeat(2, 1fr); }
  .ad--featured { grid-column: 1 / -1; }
  .ad--featured .ad__media { aspect-ratio: 21 / 9; }
}

/* Desktop: card on the left, ads on the right */
@media (min-width: 1000px) {
  .page { padding: 40px 24px 60px; }
  .layout { max-width: 1180px; grid-template-columns: 440px 1fr; gap: 36px; align-items: start; }
  .layout--solo { grid-template-columns: 460px; justify-content: center; }
  /* full-height card, no inner scrollbar. It scrolls with the page until its bottom is
     in view, then stays there beside the ads (--stick-top is set by card.js). */
  .layout .card { position: sticky; top: var(--stick-top, 24px); max-height: none; overflow: visible; }
  .ads-hint, .offers-pill { display: none !important; }
  .ads { padding-top: 0; }
  .ads__head h2 { font-size: 28px; }
  .chips { flex-wrap: wrap; overflow: visible; }
  .ad--featured { flex-direction: row; }
  .ad--featured .ad__media { aspect-ratio: auto; width: 48%; min-height: 280px; }
  .ad--featured .ad__art { font-size: 88px; }
}

@media (max-width: 639px) {
  .ads { padding: 8px 16px 0; }
}

@media (max-width: 480px) {
  .page { padding: 0 0 40px; }
  .card { border-radius: 0 0 28px 28px; }
  .block--qr { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
