/* =====================================================================
   Mr. Mechanic Platinum — dense marketplace layer
   ---------------------------------------------------------------------
   Layout patterns borrowed from high-volume marketplaces: a tight product
   grid, discount badges, "units sold" social proof, quantity-tier pricing
   and a sticky buy bar. All of it drawn in Mr. Mechanic's own palette,
   inheriting the tokens in style.css — no third-party assets or styling.

   Used by shop.html (listing) and item.html (product detail).
   ===================================================================== */

/* ----- sticky filter bar -------------------------------------------- */
.tbar {
  position: sticky; top: var(--nav-h, 76px); z-index: 40;
  background: var(--white); border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.tbar__in { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tbar__chips { display: flex; gap: 8px; overflow-x: auto; flex: 1; padding-bottom: 2px; scrollbar-width: none; }
.tbar__chips::-webkit-scrollbar { display: none; }
.tchip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-2); background: var(--white);
  font-size: .86rem; font-weight: 650; color: var(--text);
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.tchip:hover { border-color: var(--brand); color: var(--brand); }
.tchip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tchip__n { font-size: .74rem; opacity: .75; }
.tsort {
  height: 38px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--white);
  font: inherit; font-size: .86rem; font-weight: 650; color: var(--text);
}

/* ----- trust strip --------------------------------------------------- */
.ttrust {
  display: grid; gap: 10px; padding: 14px 0;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 760px) { .ttrust { grid-template-columns: repeat(4, 1fr); } }
.ttrust__i {
  display: flex; gap: 9px; align-items: center;
  font-size: .8rem; font-weight: 600; color: var(--muted);
}
.ttrust__i svg { flex: 0 0 18px; color: var(--green); }

/* ----- dense product grid ------------------------------------------- */
.tgrid {
  display: grid; gap: 10px; list-style: none; margin: 0; padding: 0;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 560px) { .tgrid { gap: 12px; grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .tgrid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1140px) { .tgrid { grid-template-columns: repeat(5, 1fr); } }

.tcard {
  position: relative; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.tcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tcard__media { position: relative; aspect-ratio: 1/1; background: var(--bg-soft); overflow: hidden; }
.tcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.tcard:hover .tcard__media img { transform: scale(1.05); }

.tcard__disc {
  position: absolute; top: 0; left: 0; z-index: 2;
  background: var(--red); color: #fff;
  font-size: .74rem; font-weight: 800; letter-spacing: .01em;
  padding: 4px 9px; border-bottom-right-radius: var(--radius-sm);
}
.tcard__flag {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  background: linear-gradient(to top, rgba(20,17,64,.88), transparent);
  color: #fff; font-size: .7rem; font-weight: 700;
  padding: 14px 8px 5px; text-align: center;
}
.tcard__wish {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.9); color: var(--muted);
  display: grid; place-items: center; cursor: pointer;
}
.tcard__wish:hover, .tcard__wish.is-on { color: var(--red); }

.tcard__b { padding: 9px 10px 11px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.tcard__t {
  font-size: .84rem; font-weight: 600; line-height: 1.35; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tcard__t a { text-decoration: none; color: inherit; }
.tcard__t a:hover { color: var(--brand); }

.tprice { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.tprice b { font-size: 1.12rem; font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
.tprice s { font-size: .78rem; color: var(--muted-2); }
.tcarton {
  font-size: .74rem; font-weight: 700; color: var(--solar);
  background: var(--solar-light); border-radius: 5px; padding: 3px 7px;
  display: inline-block; align-self: flex-start;
}
.tmeta { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: var(--muted); }
.tstars { color: var(--solar); letter-spacing: -1px; }
.tship { font-size: .72rem; font-weight: 650; color: var(--green); }

/* ----- load more / empty -------------------------------------------- */
.tmore { display: grid; place-items: center; padding: 28px 0; }
.tempty { text-align: center; padding: 56px 20px; }
.tempty h3 { font-size: 1.15rem; margin-bottom: 8px; }
.tempty p { color: var(--muted); margin-bottom: 18px; }
.tskel { background: var(--bg-soft); border-radius: var(--radius); aspect-ratio: .72; animation: tpulse 1.3s ease-in-out infinite; }
@keyframes tpulse { 0%,100% { opacity: 1 } 50% { opacity: .55 } }

/* =====================================================================
   Product detail
   ===================================================================== */
.pdp2 { display: grid; gap: 24px; padding: 22px 0 40px; }
@media (min-width: 940px) { .pdp2 { grid-template-columns: minmax(0,1fr) minmax(0,.92fr); gap: 36px; align-items: start; } }

.gal__main {
  position: relative; aspect-ratio: 1/1; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.gal__main img { width: 100%; height: 100%; object-fit: cover; }
.gal__disc {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--red); color: #fff; font-weight: 800; font-size: .86rem;
  padding: 6px 12px; border-radius: var(--radius-pill);
}
.gal__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gal__thumbs button {
  flex: 0 0 64px; width: 64px; height: 64px; padding: 0; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: none;
}
.gal__thumbs button.is-on { border-color: var(--brand); }
.gal__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pdp2 h1 { font-size: clamp(1.25rem, 2.4vw, 1.7rem); line-height: 1.3; margin-bottom: 10px; }
.prow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.prow .tstars { font-size: .95rem; }
.plink { color: var(--brand); text-decoration: none; font-weight: 650; }
.plink:hover { text-decoration: underline; }

.pbig {
  /* was a red wash; the client found it harsh. Navy tint reads calmer and
     keeps red for the one thing that should shout: the discount badge. */
  background: linear-gradient(135deg, #f2f4fb, #fff); border: 1px solid #dfe4f2;
  border-radius: var(--radius); padding: 16px; margin: 16px 0;
}
.pbig__row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pbig__now { font-size: 2rem; font-weight: 800; color: var(--brand); letter-spacing: -.03em; }
.pbig__was { font-size: 1rem; color: var(--muted); text-decoration: line-through; }
.pbig__save { font-size: .78rem; font-weight: 800; color: #fff; background: var(--red); padding: 4px 9px; border-radius: var(--radius-pill); }
.pbig__note { font-size: .78rem; color: var(--muted); margin-top: 6px; }

/* quantity tiers — retail piece vs full carton */
.tiers { display: grid; gap: 10px; margin: 18px 0; }
@media (min-width: 520px) { .tiers { grid-template-columns: 1fr 1fr; } }
.tier {
  position: relative; border: 1.5px solid var(--line-2); border-radius: var(--radius);
  padding: 13px 14px; cursor: pointer; background: var(--white);
  display: flex; flex-direction: column; gap: 3px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.tier:hover { border-color: var(--brand-light); }
.tier.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20,27,94,.09); }
.tier input { position: absolute; opacity: 0; pointer-events: none; }
.tier__k { font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.tier__p { font-size: 1.2rem; font-weight: 800; color: var(--brand); }
.tier__n { font-size: .76rem; color: var(--muted); }
.tier__tag {
  position: absolute; top: -9px; right: 10px;
  background: var(--solar); color: #fff; font-size: .66rem; font-weight: 800;
  padding: 2px 8px; border-radius: var(--radius-pill);
}
.tier--bulk.is-on { border-color: var(--solar); box-shadow: 0 0 0 3px rgba(95,63,158,.12); }
.tier--bulk .tier__p { color: var(--solar); }

.qrow { display: flex; gap: 12px; align-items: center; margin: 16px 0; }
.qstep { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; }
.qstep button { width: 42px; height: 46px; border: 0; background: none; font-size: 1.2rem; font-weight: 700; color: var(--brand); cursor: pointer; }
.qstep button:hover { background: var(--bg-soft); }
.qstep input { width: 52px; height: 46px; border: 0; text-align: center; font: inherit; font-weight: 700; appearance: textfield; -moz-appearance: textfield; }
.qstep input::-webkit-outer-spin-button, .qstep input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qnote { font-size: .78rem; color: var(--muted); }

.pacts { display: grid; gap: 10px; margin-top: 8px; }
@media (min-width: 520px) { .pacts { grid-template-columns: 1fr 1fr; } }

.badges { display: grid; gap: 11px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
@media (min-width: 520px) { .badges { grid-template-columns: 1fr 1fr; } }
.badges__i { display: flex; gap: 9px; align-items: flex-start; font-size: .82rem; color: var(--muted); }
.badges__i svg { flex: 0 0 17px; color: var(--green); margin-top: 2px; }
.badges__i b { color: var(--text); display: block; font-size: .84rem; }

/* specs + description */
.specs { width: 100%; border-collapse: collapse; font-size: .87rem; }
.specs th, .specs td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { width: 38%; color: var(--muted); font-weight: 650; background: var(--bg-soft); }

/* reviews */
.revs { display: grid; gap: 14px; }
.rev { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--white); }
.rev__top { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.rev__av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .78rem; font-weight: 700; }
.rev__who b { display: block; font-size: .85rem; }
.rev__who span { font-size: .74rem; color: var(--muted); }
.rev p { font-size: .87rem; color: var(--muted); line-height: 1.6; }
.revsum { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.revsum__n { font-size: 2.4rem; font-weight: 800; color: var(--brand); line-height: 1; }

/* sticky buy bar (mobile) */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--white); border-top: 1px solid var(--line);
  padding: 10px 14px; display: flex; gap: 10px; align-items: center;
  box-shadow: 0 -6px 20px rgba(20,24,36,.08);
  transform: translateY(110%); transition: transform .25s var(--ease);
}
.buybar.is-in { transform: translateY(0); }
@media (min-width: 940px) { .buybar { display: none; } }
.buybar__p { flex: 1; min-width: 0; }
.buybar__p b { display: block; font-size: 1.05rem; font-weight: 800; color: var(--red); }
.buybar__p span { font-size: .7rem; color: var(--muted); }
.buybar .btn { flex: 0 0 auto; }
@media (max-width: 939px) { body.has-buybar { padding-bottom: 76px; } }

/* section headings inside the PDP */
.psec { padding: 26px 0; border-top: 1px solid var(--line); }
.psec h2 { font-size: 1.15rem; margin-bottom: 14px; }

/* disclosure for placeholder social proof */
.pdisc {
  font-size: .74rem; color: var(--muted-2); font-style: italic;
  margin-top: 10px; padding: 8px 10px; background: var(--bg-soft); border-radius: var(--radius-sm);
}

/* ----- quantity-break ladder on the product page -------------------- */
.qtier {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin: 16px 0;
}
.qtier__h {
  background: var(--bg-soft); padding: 9px 14px;
  font-size: .78rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.qtier__t { width: 100%; border-collapse: collapse; font-size: .88rem; }
.qtier__t td { padding: 9px 14px; border-bottom: 1px solid var(--line); }
.qtier__t tr:last-child td { border-bottom: 0; }
.qtier__t td:first-child { color: var(--muted); }
.qtier__t td:nth-child(2) b { color: var(--brand); }
.qtier__off {
  text-align: right; font-weight: 800; font-size: .78rem; color: var(--solar);
  white-space: nowrap;
}

/* ----- out of stock notice on the product page ---------------------- */
.oos-note {
  background: #fff7ed; border: 1px solid #fcd9a8; border-radius: var(--radius);
  padding: 12px 14px; margin: 4px 0 12px; font-size: .87rem; color: #7a4a08;
  line-height: 1.55;
}
.oos-note b { display: block; margin-bottom: 2px; color: #6b3f05; }
.pacts .btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* =====================================================================
   Checkout
   ===================================================================== */
.co-grid { display: grid; gap: 22px; padding: 24px 0 48px; }
@media (min-width: 900px) { .co-grid { grid-template-columns: 1.25fr .75fr; align-items: start; } }

.co-panel {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px;
}
.co-panel h2 { font-size: 1.25rem; margin: 0 0 16px; }
.co-ref { font-size: .8rem; color: var(--muted); margin: 0 0 6px; }
.co-sub { color: var(--muted); margin: -8px 0 18px; }
.co-sub b { color: var(--brand); font-size: 1.15rem; }
.co-panel .field { margin-bottom: 14px; }
.co-panel textarea.input { min-height: 76px; padding: 12px 14px; resize: vertical; }

.co-err {
  background: #fdeceb; border: 1px solid #f6cfcd; color: #b4160f;
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: .86rem; margin: 0 0 14px;
}

/* order summary */
.co-summary {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px;
}
@media (min-width: 900px) { .co-summary { position: sticky; top: 96px; } }
.co-summary h3 { font-size: 1rem; margin: 0 0 14px; }
.co-lines { list-style: none; margin: 0; padding: 0; }
.co-lines li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .87rem;
}
.co-lines li span { color: var(--muted); }
.co-lines__total { border-bottom: 0 !important; padding-top: 14px !important; font-size: 1rem !important; }
.co-lines__total span { color: var(--text) !important; font-weight: 700; }
.co-lines__total b { color: var(--brand); font-size: 1.2rem; }
.co-note { font-size: .78rem; color: var(--muted); margin: 10px 0 0; line-height: 1.55; }

/* payment choices */
.co-pays { display: grid; gap: 10px; margin-bottom: 16px; }
.co-pay {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--white); border: 1.5px solid var(--line-2);
  border-radius: var(--radius); padding: 14px 16px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.co-pay:hover { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20,27,94,.08); }
.co-pay__t { display: block; font-weight: 700; font-size: .96rem; color: var(--text); }
.co-pay__s { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }

.co-bank {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-top: 4px;
}
.co-bank h4 { margin: 0 0 8px; font-size: .9rem; }
.co-bank p { font-size: .9rem; line-height: 1.6; margin: 0 0 12px; }

/* empty + done */
.co-empty, .co-done { text-align: center; padding: 60px 20px; }
.co-empty h2, .co-done h2 { font-size: 1.4rem; margin-bottom: 10px; }
.co-empty p, .co-done p { color: var(--muted); margin-bottom: 18px; }
.co-done__tick {
  width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 50%;
  background: #e7f6ee; color: #0e6d3d; display: grid; place-items: center;
  font-size: 1.9rem; font-weight: 800;
}
.co-done__acts { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* =====================================================================
   Invoice sheet — screen and print
   ===================================================================== */
.inv-body { background: #eef1f7; }
.inv-bar {
  max-width: 820px; margin: 0 auto; padding: 18px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.inv-sheet {
  max-width: 820px; margin: 0 auto 20px; background: #fff; padding: 40px;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(20,24,36,.08);
}
.inv-loading, .inv-fail { text-align: center; padding: 40px 0; color: var(--muted); }
.inv-fail h2 { color: var(--text); margin-bottom: 8px; }
.inv-tip { max-width: 820px; margin: 0 auto 40px; padding: 0 20px; font-size: .8rem; color: var(--muted); text-align: center; }

.inv-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-bottom: 22px; border-bottom: 3px solid var(--brand); }
.inv-logo { height: 46px; width: auto; margin-bottom: 10px; }
.inv-head__meta { text-align: right; }
.inv-head__meta h1 { font-size: 1.7rem; letter-spacing: .06em; color: var(--brand); margin: 0 0 6px; }
.inv-head__meta p { font-size: .86rem; line-height: 1.6; margin: 0 0 8px; }
.inv-small { font-size: .78rem; color: var(--muted); line-height: 1.6; margin: 0; }

.inv-status {
  display: inline-block; padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: .74rem; font-weight: 800; letter-spacing: .05em;
}
.inv-status--paid { background: #e7f6ee; color: #0e6d3d; }
.inv-status--due { background: #fff5e0; color: #8a5b00; }

.inv-parties { display: grid; gap: 20px; padding: 22px 0; }
@media (min-width: 560px) { .inv-parties { grid-template-columns: 1fr 1fr; } }
.inv-parties h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 6px; }
.inv-parties p { font-size: .88rem; line-height: 1.65; margin: 0; }

.inv-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 6px; }
.inv-table th {
  text-align: left; padding: 10px 8px; background: var(--bg-soft);
  font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  border-bottom: 2px solid var(--brand);
}
.inv-table td { padding: 11px 8px; border-bottom: 1px solid var(--line); }
.inv-table tfoot td { border-bottom: 0; padding-top: 12px; font-weight: 600; }
.inv-total td { font-size: 1.05rem; font-weight: 800; color: var(--brand); border-top: 2px solid var(--line); }
.ta-c { text-align: center; }

.inv-pay {
  margin-top: 24px; padding: 16px 18px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.inv-pay h4 { margin: 0 0 8px; font-size: .9rem; }
.inv-pay p { font-size: .88rem; line-height: 1.6; margin: 0 0 8px; }

.inv-foot { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.inv-foot p { font-size: .82rem; color: var(--muted); line-height: 1.6; margin: 0 0 6px; }

@media print {
  .no-print, .inv-bar, .inv-tip { display: none !important; }
  .inv-body { background: #fff; }
  .inv-sheet { max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; border-radius: 0; }
  @page { margin: 16mm; }
}

/* subcategory row under the main category chips */
.tbar__chips--sub { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.tchip--sub { height: 34px; font-size: .82rem; background: var(--bg-soft); }
.tchip--sub:hover { background: var(--white); }

/* =====================================================================
   Homepage category browser — folder-style drill down
   ===================================================================== */
.catcrumb {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 16px; font-size: .88rem;
}
.catcrumb__back {
  border: 1px solid var(--line-2); background: var(--white); color: var(--brand);
  border-radius: var(--radius-pill); padding: 7px 15px;
  font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer;
}
.catcrumb__back:hover { border-color: var(--brand); background: var(--bg-soft); }
.catcrumb__path { color: var(--muted); }
.catcrumb__path a { color: var(--brand); text-decoration: none; font-weight: 600; }
.catcrumb__path a:hover { text-decoration: underline; }
.catcrumb__path b { color: var(--text); }

/* a category holding subcategories reads as a folder, not a dead end */
.cat-tile--folder { position: relative; }
.cat-tile--folder::after {
  content: "›"; position: absolute; top: 12px; right: 14px;
  font-size: 1.3rem; line-height: 1; color: var(--brand); opacity: .55;
}
.cat-tile__sub {
  display: block; font-size: .72rem; font-weight: 700; color: var(--solar);
  margin-top: 2px;
}
.cat-tile--all { border-style: dashed; }

/* =====================================================================
   Customer account
   ===================================================================== */
.acct-wrap { max-width: 460px; margin: 24px auto 60px; }
.acct-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.acct-tab {
  flex: 1; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--white);
  font: inherit; font-size: .9rem; font-weight: 700; color: var(--muted); cursor: pointer;
}
.acct-tab.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }

.acct-card2 {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px;
}
.acct-card2 h2 { font-size: 1.15rem; margin: 0 0 6px; }
.acct-card2 h3 { font-size: 1rem; margin: 0 0 12px; }
.acct-card2 .field { margin-bottom: 14px; }
.acct-note { font-size: .82rem; color: var(--muted); margin: 0 0 16px; line-height: 1.55; }
.acct-guest { text-align: center; font-size: .84rem; color: var(--muted); margin-top: 18px; }
.acct-guest a { color: var(--brand); font-weight: 600; }

.acct-grid { display: grid; gap: 20px; padding: 24px 0 60px; }
@media (min-width: 900px) { .acct-grid { grid-template-columns: 1.4fr .6fr; align-items: start; } }
.acct-side { display: block; }

.acct-order {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; margin-bottom: 12px; background: var(--white);
}
.acct-order__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.acct-order__top b { display: block; font-size: .95rem; }
.acct-order__top span { font-size: .78rem; color: var(--muted); }
.acct-order__items { list-style: none; margin: 0 0 12px; padding: 0; font-size: .85rem; color: var(--muted); }
.acct-order__items li { padding: 3px 0; }
.acct-order__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding-top: 11px; border-top: 1px solid var(--line);
}
.acct-order__foot b { font-size: 1.05rem; color: var(--brand); }
.acct-empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.acct-empty p { margin-bottom: 16px; }

/* =====================================================================
   Category tiles — picture-led, with input-appropriate feedback
   Hover effects only where there is a real pointer; touch devices get a
   press state instead, since a phone has no hover and sticky :hover
   leaves tiles looking stuck after a tap.
   ===================================================================== */
.cat-tile {
  position: relative; overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.cat-tile__img { overflow: hidden; }
.cat-tile__img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .45s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand-light); }
  .cat-tile:hover .cat-tile__img img { transform: scale(1.07); }
  .cat-tile:hover h3 { color: var(--brand); }
  .cat-tile--folder:hover::after { transform: translateX(3px); opacity: 1; }
  .tcard:hover .tcard__media img { transform: scale(1.06); }
}

@media (hover: none) {
  .cat-tile:active { transform: scale(.975); box-shadow: var(--shadow-sm); }
  .tcard:active { transform: scale(.985); }
}

.cat-tile--folder::after { transition: transform .22s var(--ease), opacity .22s var(--ease); }

/* keyboard users get the same affordance as mouse users */
.cat-tile:focus-visible {
  outline: 3px solid var(--brand); outline-offset: 2px;
  transform: translateY(-4px);
}

/* picture tiles: let the image lead, caption sits over a soft gradient */
.cat-tile__img { aspect-ratio: 4 / 3; border-radius: var(--radius-sm); margin-bottom: 10px; }
.cat-tile__ic.cat-tile__img { padding: 0; background: var(--bg-soft); }

/* =====================================================================
   Categories: the tree, and the "where does this go?" chooser
   ---------------------------------------------------------------------
   These replaced a flat grid of picture tiles. The grid looked tidy but
   it hid the one thing that actually matters here — what sits inside
   what — so nobody could work out how to add a subcategory.
   ===================================================================== */

.howto { background: #f2f6ff; border: 1px solid #d5e0f7; border-radius: 12px; padding: 16px 20px; margin: 0 0 18px; }
.howto h3 { margin: 0 0 8px; font-size: .98rem; color: #141b5e; }
.howto ol { margin: 0; padding-left: 20px; }
.howto li { font-size: .89rem; line-height: 1.75; color: #3d4457; margin-bottom: 4px; }
.howto i { color: #141b5e; font-style: normal; font-weight: 600; }

.cat-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.chip { border: 1px solid var(--line); background: #fff; color: #3d4457; border-radius: 999px;
        padding: 8px 16px; font-size: .86rem; font-weight: 600; cursor: pointer; }
.chip.is-on { background: #141b5e; border-color: #141b5e; color: #fff; }

.cat-tree { padding-bottom: 40px; }
.cat-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
           background: #fff; border: 1px solid var(--line); border-radius: 12px;
           padding: 13px 16px; margin-bottom: 8px; }
.cat-row--sub  { margin-left: 26px; background: #fcfdff; }
.cat-row--sub2 { margin-left: 52px; background: #fafbfe; }
.cat-row__thumb { width: 42px; height: 42px; border-radius: 8px; object-fit: cover;
                  background: var(--bg-soft-2); flex: 0 0 auto; }
.cat-row__main { flex: 1 1 200px; min-width: 0; }
.cat-row__name { font-weight: 700; font-size: .96rem; color: #141824; }
.cat-row__meta { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.cat-row__acts { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-row__acts .btn { padding: 7px 12px; font-size: .8rem; }
.lvl { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em;
       text-transform: uppercase; padding: 2px 8px; border-radius: 999px; margin-right: 8px;
       vertical-align: 2px; }
.lvl--main { background: #e7edff; color: #2a3a8f; }
.lvl--sub  { background: #e9f7ee; color: #1d6b3c; }
.lvl--sub2 { background: #fdf0e3; color: #8a5216; }
.cat-empty { padding: 30px 20px; text-align: center; color: var(--muted); font-size: .9rem; }

.place-box { border: 2px solid #d5e0f7; background: #f8faff; border-radius: 12px;
             padding: 18px 20px; margin: 0 0 22px; }
.place-box h3 { margin: 0 0 12px; font-size: 1rem; color: #141b5e; }
.place-opt { display: flex; gap: 11px; align-items: flex-start; padding: 10px 12px;
             border: 1px solid transparent; border-radius: 9px; cursor: pointer; }
.place-opt:hover { background: #fff; border-color: var(--line); }
.place-opt input { margin-top: 3px; flex: 0 0 auto; width: 18px; height: 18px; }
.place-opt b { display: block; font-size: .92rem; color: #141824; }
.place-opt em { display: block; font-style: normal; font-size: .82rem; color: var(--muted); margin-top: 2px; }
.place-echo { margin: 10px 0 0; font-size: .86rem; font-weight: 600; color: #1d6b3c; }
.place-echo:empty { display: none; }
