/* ============================================================
   JustHeyo — theme based on Ronas IT "E-commerce Website" shot
   (dribbble.com/shots/22402874): Satoshi type, warm gray page,
   white rounded shell, beige panels, black pill CTAs, yellow accent.
   Colors: #010101 ink · #f2f0ea beige · #edcf5d yellow · #a4a4a4 gray
   ============================================================ */

@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-Variable.70880e42f07b.woff2") format("woff2-variations");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-VariableItalic.ed39abb752ab.woff2") format("woff2-variations");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #e4e2de;
  --surface: #ffffff;
  --ink: #010101;
  --ink-2: #2b2b2b;
  --muted: #a4a4a4;
  --beige: #f2f0ea;
  --line: #ebe9e4;
  --accent: #010101;
  --accent-soft: #f2f0ea;
  --yellow: #edcf5d;
  --gold: #edcf5d;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgb(1 1 1 / 0.04), 0 16px 40px -22px rgb(1 1 1 / 0.16);
  --shadow-lg: 0 24px 56px -22px rgb(1 1 1 / 0.28);
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55; -webkit-font-smoothing: antialiased;
  padding: 16px;
}
img { max-width: 100%; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* page shell: white rounded panel floating on the warm gray canvas */
.shell {
  background: var(--surface); border-radius: 28px;
  max-width: 1360px; margin: 0 auto;
  box-shadow: var(--shadow-lg);
  overflow: clip;
}
main { max-width: 1200px; margin: 0 auto; padding: 20px 24px 64px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 28px;
  background: rgb(255 255 255 / 0.88);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 900; font-size: 1.3rem; letter-spacing: -0.04em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.tagline { color: var(--muted); font-size: 0.78rem; }

/* store-style search pill in header */
.header-search {
  flex: 1; max-width: 420px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  background: var(--beige); border-radius: 999px; padding: 10px 18px;
  color: var(--muted); transition: box-shadow 0.15s, background 0.15s;
}
.header-search:focus-within { background: var(--surface); box-shadow: 0 0 0 1.5px var(--ink); color: var(--ink); }
.header-search input {
  border: none; background: none; padding: 0; width: 100%;
  font: inherit; font-size: 0.92rem; color: var(--ink);
}
.header-search input:focus { outline: none; }
.header-search svg { flex: none; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 0.92rem; font-weight: 500; }
.site-nav a { color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.inline-form { display: inline; margin: 0; }
.link-btn { background: none; border: none; padding: 0; color: var(--ink-2); font: inherit; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.nav-cta {
  background: var(--ink); color: #fff !important; padding: 9px 20px; border-radius: 999px; font-weight: 700;
}
.nav-cta:hover { background: #000; text-decoration: none; }

/* ---------- buttons / forms ---------- */
.btn, button {
  display: inline-block; background: var(--ink); color: #fff; border: none;
  padding: 13px 26px; border-radius: 999px; font-size: 0.98rem; font-weight: 700;
  cursor: pointer; transition: background 0.15s, transform 0.1s;
}
.btn:hover, button:hover { background: #000; text-decoration: none; }
.btn:active, button:active { transform: translateY(1px); }
.form label { display: block; margin-bottom: 14px; font-weight: 700; font-size: 0.9rem; }
.form input, .form textarea {
  display: block; width: 100%; margin-top: 4px; font-size: 1rem;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface);
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--ink); }
.errorlist { list-style: none; margin: 0 0 6px; padding: 0; color: #991b1b; font-weight: 500; font-size: 0.85rem; }
.errorlist li { margin-bottom: 2px; }
.form input[aria-invalid="true"], .form textarea[aria-invalid="true"] { border-color: #dc2626; }
.helptext { display: block; margin-top: 4px; color: var(--muted); font-size: 0.8rem; font-weight: 400; }
.helptext ul { margin: 4px 0 0; padding-left: 16px; }
.helptext li { margin-bottom: 2px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  border-radius: 28px; padding: 52px 24px 36px;
  background: linear-gradient(180deg, #f4f2ee 0%, #ebe8e2 100%);
}
.hero h1 { font-size: 2.9rem; font-weight: 900; margin: 0 0 14px; }
.hero .sub { color: var(--muted); font-size: 1.08rem; margin: 0 auto 30px; max-width: 520px; }
.hero-pill {
  display: inline-block; background: var(--yellow); color: var(--ink);
  font-size: 0.8rem; font-weight: 700; padding: 7px 16px; border-radius: 999px;
  margin: 0 0 18px;
}

/* ---------- search card ---------- */
.search-card {
  background: var(--surface); border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 10px 18px 18px; max-width: 720px; margin: 0 auto;
  text-align: left;
}
.search-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab-btn {
  background: none; color: var(--muted); border-radius: 0; padding: 12px 16px;
  font-size: 0.92rem; font-weight: 700; border-bottom: 2px solid transparent;
}
.tab-btn:hover { background: none; color: var(--ink); }
.tab-btn.active { color: var(--ink); border-bottom-color: var(--ink); }
.paste-form { display: flex; flex-direction: column; gap: 10px; }
.paste-form input {
  padding: 15px 18px; font-size: 1.05rem; border: 1.5px solid var(--line);
  border-radius: 999px; width: 100%; background: var(--beige);
}
.paste-form input:focus { outline: none; border-color: var(--ink); background: var(--surface); }
.photo-drop {
  border: 2px dashed var(--line); border-radius: var(--radius-sm); padding: 28px;
  text-align: center; color: var(--muted); cursor: pointer;
}
.photo-drop:hover { border-color: var(--ink); color: var(--ink); }
.photo-drop input { display: none; }
.spinner { color: var(--muted); text-align: center; padding: 14px; }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: block; }
.htmx-request.htmx-indicator { display: block; }

/* ---------- chips & trust ---------- */
.chips { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.chips-label { color: var(--muted); font-size: 0.85rem; }
.chip {
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--line);
  padding: 9px 18px; border-radius: 999px; font-size: 0.88rem; font-weight: 600;
}
.chip:hover { background: var(--ink); color: #fff; border-color: var(--ink); text-decoration: none; }
.trust-bar { margin: 30px auto 0; display: flex; flex-wrap: wrap; gap: 18px 28px; justify-content: center; }
.trust-item {
  font-size: 0.88rem; font-weight: 700; color: var(--ink-2);
  display: flex; gap: 8px; align-items: center;
}
.trust-item span { font-size: 1.05rem; }

/* ---------- product cards ---------- */
.cards { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 18px; }
.card {
  background: var(--surface); border: none; border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.cards .card {
  padding: 0; overflow: hidden; display: flex; flex-direction: column; position: relative;
  box-shadow: none; border: 1px solid var(--line);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cards .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; overflow: hidden; aspect-ratio: 1; background: var(--beige); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; display: block; }
.cards .card:hover .card-media img { transform: scale(1.05); }
.price-pill {
  position: absolute; left: 12px; bottom: 12px;
  background: var(--surface); color: var(--ink);
  font-weight: 800; font-size: 0.95rem; padding: 7px 14px; border-radius: 999px;
  box-shadow: 0 4px 14px rgb(1 1 1 / 0.16);
}
.card .badge {
  position: absolute; z-index: 2; margin: 12px; background: var(--yellow); color: var(--ink);
  font-size: 0.72rem; font-weight: 800; padding: 6px 12px; border-radius: 999px;
}
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; font-size: 0.98rem; font-weight: 700; }
.price { color: var(--ink); font-weight: 900; font-size: 1.15rem; margin: 0; }
.card .btn { margin-top: auto; text-align: center; }
.variant-label { display: block; margin: 8px 0; font-size: 0.85rem; color: var(--muted); }
.variant-label select { width: 100%; margin-top: 4px; padding: 10px; border-radius: 10px; border: 1.5px solid var(--line); font-size: 0.95rem; background: var(--surface); }

/* ---------- flash messages ---------- */
.messages { max-width: 720px; margin: 16px auto 0; }
.messages .alert { margin-top: 0; margin-bottom: 10px; }

/* ---------- sections ---------- */
.results h2, .trending h2 { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 44px; }
.section-head h2 { margin: 0; font-size: 1.5rem; }
.empty { background: var(--beige); border-radius: var(--radius); padding: 18px; }
.alert-error { background: #fef2f2; color: #991b1b; padding: 12px 16px; border-radius: var(--radius-sm); margin-top: 16px; }
.alert-info { background: #eff6ff; color: #1e40af; padding: 12px 16px; border-radius: var(--radius-sm); }
.alert-success { background: #ecfdf5; color: #065f46; padding: 12px 16px; border-radius: var(--radius-sm); }

/* ---------- checkout / orders ---------- */
.checkout .card, .status .card { margin-bottom: 18px; }
.checkout .order-summary { display: flex; gap: 14px; align-items: center; }
.checkout .order-summary img, .status .card img { width: 96px; height: 96px; flex: none; border-radius: var(--radius-sm); object-fit: cover; background: var(--beige); }
.shipping-option, .form label.shipping-option { display: flex; gap: 12px; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--line); font-weight: 500; cursor: pointer; margin-bottom: 0; }
.shipping-option:last-of-type { border-bottom: none; }
.shipping-option input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.shipping-option span { flex: 1; }
.shipping-option strong { white-space: nowrap; }
.instructions ul { padding-left: 18px; }
.order-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.order-row { display: flex; align-items: center; gap: 14px; }
.order-row img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--beige); flex: none; }
.order-row-main { flex: 1; min-width: 0; }
.order-row-main p { margin: 2px 0 0; }
.order-row .status-pill { margin-bottom: 0; flex: none; }

/* ---------- inner pages ---------- */
.auth { max-width: 480px; margin: 0 auto; }
.auth h1, .payment h1, .status h1, .checkout h1 { font-size: 1.7rem; margin: 12px 0 18px; }
.auth .card { padding: 22px; margin-bottom: 20px; }
.auth h3 { margin-top: 0; }
.checkout-grid { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.checkout-side { position: sticky; top: 84px; }
.checkout-side .price-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.95rem; }
.checkout-side .price-line.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 900; font-size: 1.1rem; }
.status-pill {
  display: inline-block; background: var(--yellow); color: var(--ink);
  font-weight: 800; font-size: 0.85rem; padding: 7px 16px; border-radius: 999px; margin-bottom: 14px;
}
.timeline { list-style: none; padding: 0 0 0 22px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px;
  background: var(--line); border-radius: 2px;
}
.timeline li { position: relative; padding: 8px 0 8px 14px; margin: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -21px; top: 14px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--surface); border: 3px solid var(--ink);
}
.timeline li:first-child::before { background: var(--ink); }
.timeline .muted { font-size: 0.82rem; }
.instructions { background: var(--beige); border-radius: var(--radius); padding: 22px 24px; }
.instructions h2 { margin-top: 0; font-size: 1.15rem; }
.payment .btn { width: 100%; text-align: center; margin-top: 18px; padding: 16px; font-size: 1.05rem; }

/* payment instruction fields */
.pay-fields { margin: 0; }
.pay-field {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.pay-field:last-child { border-bottom: none; }
.pay-field dt { color: var(--muted); font-size: 0.88rem; margin: 0; }
.pay-field dd { margin: 0; display: flex; align-items: center; gap: 10px; }
.pay-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.pay-amount { font-size: 1.2rem; font-weight: 900; }
.copy-btn {
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--line);
  padding: 6px 14px; border-radius: 999px; font-size: 0.78rem; font-weight: 700;
}
.copy-btn:hover { border-color: var(--ink); background: var(--surface); }
.copy-btn.copied { background: var(--ink); color: #fff; border-color: var(--ink); }
.pay-note { margin: 14px 0 0; }

@media (max-width: 719px) {
  .pay-field { align-items: flex-start; }
  .pay-field dd { flex-direction: column; align-items: flex-end; gap: 6px; }
  .pay-value { white-space: nowrap; }
}

/* ---------- footer ---------- */
.site-footer {
  margin: 48px 16px 16px; padding: 44px 28px 26px; text-align: left;
  background: var(--beige); color: var(--muted);
  border-radius: 24px;
}
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 26px; }
.footer-grid a { display: block; color: var(--muted); margin-bottom: 8px; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--ink); text-decoration: none; }
.footer-brand { font-weight: 900; font-size: 1.2rem; color: var(--ink); margin: 0 0 6px; letter-spacing: -0.03em; }
.footer-head { font-weight: 800; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink); margin: 0 0 10px; }
.footer-fine { max-width: 1200px; margin: 30px auto 0; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; font-size: 0.82rem; }

@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .paste-form { flex-direction: row; }
  .paste-form input { flex: 1; }
  .paste-form button { width: auto; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.2fr; }
}
@media (min-width: 900px) {
  .checkout-grid { grid-template-columns: 1.5fr 1fr; }
}
@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 719px) {
  body { padding: 8px; }
  .shell { border-radius: 20px; }
  .tagline { display: none; }
  .header-search { display: none; }
  .announce { font-size: 0.72rem; padding: 7px 10px; white-space: nowrap; overflow: hidden; }
  .announce-extra { display: none; }
  .site-header { padding: 12px 16px; gap: 10px; }
  .brand { font-size: 1.1rem; }
  .brand-mark { width: 22px; height: 22px; }
  .site-nav { gap: 12px; font-size: 0.85rem; }
  .nav-cta { padding: 8px 14px; }
  .chips-label { width: 100%; text-align: center; }
  .trust-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; justify-content: start; }
  .trust-item { white-space: normal; }
  .hero h1 { font-size: 2.1rem; }
  .site-footer { margin: 40px 8px 8px; }
}

/* ---------- premium polish ---------- */
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.announce {
  background: var(--yellow); color: var(--ink);
  text-align: center; font-size: 0.8rem; font-weight: 700;
  padding: 9px 16px; letter-spacing: 0.02em;
}

/* bento hero */
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 24px; text-align: left; align-items: center; }
.hero-main { text-align: center; }
.hero-main .search-card, .hero-main .chips, .hero-main .trust-bar { text-align: center; }
.hero h1 em { font-style: italic; letter-spacing: -0.04em; }
.hero-side { display: none; }

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1.6fr 1fr; }
  .hero-main { text-align: left; }
  .hero-main .chips, .hero-main .trust-bar { justify-content: flex-start; }
  .hero-main .search-card { margin: 0; }
  .hero-side { display: block; }
}
.hero-side-label {
  font-size: 0.78rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px;
}
.hero-feature {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden;
  background: var(--beige); box-shadow: var(--shadow-lg);
}
.hero-feature:hover { text-decoration: none; }
.hero-feature img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform 0.4s ease; }
.hero-feature:hover img { transform: scale(1.04); }
.hero-feature-info {
  position: absolute; left: 14px; bottom: 14px; right: 70px;
  display: flex; flex-direction: column; gap: 2px;
  background: rgb(255 255 255 / 0.92); backdrop-filter: blur(8px);
  padding: 12px 16px; border-radius: 14px; font-size: 0.9rem;
}
.hero-feature-price { font-weight: 900; }
.hero-feature-cta {
  position: absolute; right: 14px; bottom: 14px; width: 46px; height: 46px;
  background: var(--ink); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  transition: transform 0.2s;
}
.hero-feature:hover .hero-feature-cta { transform: translateX(4px); }

/* sliding arrow buttons */
.btn-arrow::after { content: "→"; display: inline-block; margin-left: 8px; transition: transform 0.15s; }
.btn-arrow:hover::after { transform: translateX(4px); }

/* skeleton shimmer */
.skeleton-row { margin-top: 24px; }
.skeleton-card { padding: 0; overflow: hidden; }
.skeleton-media { aspect-ratio: 1; background: linear-gradient(100deg, #eceae5 40%, #f6f4ef 50%, #eceae5 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton-lines { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.skeleton-lines span { height: 12px; border-radius: 6px; background: linear-gradient(100deg, #eceae5 40%, #f6f4ef 50%, #eceae5 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton-lines span:nth-child(2) { width: 60%; }
.skeleton-lines span:nth-child(3) { width: 40%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* staggered card entrance */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cards .card { animation: fadeUp 0.45s cubic-bezier(0.2, 0.6, 0.3, 1) both; }
.cards .card:nth-child(2) { animation-delay: 0.05s; }
.cards .card:nth-child(3) { animation-delay: 0.1s; }
.cards .card:nth-child(4) { animation-delay: 0.15s; }
.cards .card:nth-child(5) { animation-delay: 0.2s; }
.cards .card:nth-child(6) { animation-delay: 0.25s; }
.cards .card:nth-child(7) { animation-delay: 0.3s; }
.cards .card:nth-child(8) { animation-delay: 0.35s; }
@media (prefers-reduced-motion: reduce) {
  .cards .card, .skeleton-media, .skeleton-lines span { animation: none; }
  .hero-feature img, .card-media img { transition: none; }
}

/* mobile snap-scroll rows */
@media (max-width: 719px) {
  .trending .cards {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 14px; padding-bottom: 8px; margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px;
  }
  .trending .cards .card { flex: 0 0 74%; scroll-snap-align: start; }
  .trending .cards::-webkit-scrollbar { display: none; }
}

/* ---------- brand & alignment system ---------- */
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark { border-radius: 8px; flex: none; }

/* consistent page scaffold for inner pages */
.page { max-width: 720px; margin: 0 auto; }
.page.wide { max-width: 1080px; }
.page-head { margin: 8px 0 22px; }
.page-head h1 { font-size: 1.7rem; margin: 0 0 6px; }
.page-head .muted { margin: 0; }
.page .card { padding: 22px; margin-bottom: 18px; }
.page .card h3 { margin-top: 0; }

.btn-block { width: 100%; text-align: center; }

/* results section head */
.results-head { display: flex; align-items: center; gap: 12px; margin: 44px 0 4px; flex-wrap: wrap; }
.results-head h2 { margin: 0; font-size: 1.5rem; }
.count-pill {
  background: var(--beige); color: var(--ink);
  font-weight: 800; font-size: 0.82rem; padding: 5px 13px; border-radius: 999px;
}

/* trust grid: single clean row, never wraps mid-item */
.trust-bar { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 28px; }
.trust-item { white-space: nowrap; font-size: 0.85rem; }
