/* Tasyca Product Catalog Styles - v3.0 */

.tp {
  --bg: #f6faf9;
  --surface: #ffffff;
  --ink: #0f2925;
  --muted: #4b625f;
  --line: #d2e2de;

  --general: #0f766e;
  --diabetic: #2563a8;
  --cardiac: #b4233c;
  --tint-general: #e6f3f1;
  --tint-diabetic: #e8f0fa;
  --tint-cardiac: #fbeaee;

  --deep: #0b3a42;
  --wa: #0f7a45;
  --wa-hover: #0c6639;
  --danger: #b4233c;

  --accent: #0f766e;
  --tint: #e6f3f1;

  --r-card: 14px;
  --r-ctl: 10px;

  /* Set this on your page/theme if your site header is sticky, e.g. .tp { --tp-sticky-top: 70px; } */
  --tp-sticky-top: 0px;
  --tp-bar-h: 120px;

  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  padding: 0 0 2rem;
}

.admin-bar .tp { --tp-sticky-top: 32px; }
@media (max-width: 782px) { .admin-bar .tp { --tp-sticky-top: 46px; } }
@media (max-width: 600px) { .admin-bar .tp { --tp-sticky-top: 0px; } }

/* Each category sets --accent from JavaScript; the soft tint is derived from it. */
@supports (color: color-mix(in srgb, red 10%, white)) {
  .tp { --tint: color-mix(in srgb, var(--accent) 12%, #ffffff); }
}

.tp *, .tp *::before, .tp *::after { box-sizing: border-box; }
.tp [hidden] { display: none !important; }
.tp main { max-width: 1240px; margin: 0 auto; padding: 0 1.25rem 3rem; }
.tp h1, .tp h2, .tp h3 { line-height: 1.25; }
.tp :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tp .hero :focus-visible, .tp .franchise :focus-visible, .tp .tray :focus-visible { outline-color: #8fd4da; }
.tp .muted { color: var(--muted); font-size: .92rem; margin: 0; }
.tp .small { font-size: .82rem; }

/* ---------- Hero ---------- */
.tp .hero { background: var(--deep); color: #fff; padding: 3.5rem 1.25rem 2.5rem; border-radius: 0 0 16px 16px; margin-bottom: 2rem; }
.tp .hero .in { max-width: 1240px; margin: 0 auto; }
.tp .hero-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.tp .hero small { font-size: .95rem; color: #8fd4da; font-weight: 600; }
.tp .hero h1 { font-family: Fraunces, Georgia, serif; font-size: clamp(2rem, 5vw, 3.2rem); margin: .4rem 0 .7rem; color: #fff !important; }
.tp .hero p { margin: 0; max-width: 58ch; color: #cfe5e7 !important; font-size: 1.05rem; }
.tp .hero p.hero-cta { margin-top: 1.25rem; }
.tp .hero-admin { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

.tp .stats { list-style: none; margin: 2.25rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid rgba(255, 255, 255, .18); display: flex; gap: 1.5rem 3rem; flex-wrap: wrap; }
.tp .stats li { display: flex; flex-direction: column; }
.tp .stats strong { font-family: Fraunces, Georgia, serif; font-size: 1.9rem; line-height: 1.1; color: #fff; }
.tp .stats span { font-size: .88rem; color: #a9cfd3; }

.tp .hero-edit-form { margin-top: 1.25rem; background: rgba(255, 255, 255, .1); padding: 1rem; border-radius: var(--r-card); display: grid; gap: .8rem; max-width: 640px; }
.tp .hero-edit-form label { color: #fff; }
.tp .hero-edit-form .row { display: flex; gap: .6rem; }
.tp .admin-badge { font-size: .8rem; font-weight: 600; color: var(--deep); background: #8fd4da; padding: .25rem .6rem; border-radius: 999px; }

/* ---------- Notice, disclaimer ---------- */
.tp .notice { background: #fff7e0; border: 1px solid #ecd58a; color: #5c4600; border-radius: var(--r-ctl); padding: .75rem 1rem; margin-bottom: 1rem; font-size: .92rem; }
.tp .notice a { color: inherit; font-weight: 600; }
.tp .disclaimer { margin: 2rem 0 0; color: var(--muted); font-size: .85rem; max-width: 80ch; }

/* ---------- Sticky search + range switcher ---------- */
.tp .sticky-bar {
  position: sticky; top: var(--tp-sticky-top); z-index: 30;
  background: var(--bg); padding: .75rem 0 0; margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.tp .search-row { display: flex; gap: .6rem 1.25rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; }
.tp .search-input-wrap { flex: 1; min-width: 240px; position: relative; display: flex; align-items: center; }
.tp .search-input-wrap input { width: 100%; padding: .7rem 2.5rem .7rem .9rem; }
.tp .search-clear { position: absolute; right: .35rem; width: 2rem; height: 2rem; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.4rem; line-height: 1; display: none; border-radius: 50%; }
.tp .search-input-wrap input:not(:placeholder-shown) + .search-clear { display: block; }
.tp .search-meta { font-size: .9rem; color: var(--muted); font-weight: 500; }

.tp .tabs { display: flex; gap: .3rem; flex-wrap: wrap; }
.tp .tab {
  appearance: none; border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted);
  padding: .65rem 1rem; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px;
  display: flex; align-items: center; gap: .5rem; transition: color .2s ease;
}
.tp .tab:hover { color: var(--ink); }
.tp .tab-count { background: var(--line); color: var(--ink); font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; font-weight: 600; }
.tp .tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tp .tab[aria-selected="true"] .tab-count { background: var(--accent); color: #fff; }

/* ---------- Layout: filters + content ---------- */
.tp .layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2rem; align-items: start; }

.tp .filters { position: sticky; top: calc(var(--tp-sticky-top) + var(--tp-bar-h) + 1rem); max-height: calc(100vh - var(--tp-bar-h) - var(--tp-sticky-top) - 2rem); overflow: auto; }
.tp .filters details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.tp .filters summary { display: none; list-style: none; cursor: pointer; font-weight: 600; padding: .8rem 1rem; }
.tp .filters summary::-webkit-details-marker { display: none; }
.tp #filterBody { padding: 1rem; display: grid; gap: 1.25rem; }
.tp .fgroup { display: flex; flex-direction: column; gap: .15rem; }
.tp .flabel { margin: 0 0 .35rem; font-size: .82rem; font-weight: 700; color: var(--muted); }
.tp .fopt {
  font: inherit; font-size: .9rem; color: var(--ink); background: none; border: 0; border-radius: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .4rem .6rem; cursor: pointer; text-align: left;
}
.tp .fopt:hover:not(:disabled) { background: var(--bg); }
.tp .fopt[aria-pressed="true"] { background: var(--tint); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.tp .fopt:disabled { opacity: .4; cursor: default; }
.tp .fcount { font-size: .78rem; color: var(--muted); }


.tp mark { background: #fff1a8; color: inherit; border-radius: 3px; padding: 0 .1em; }

/* ---------- Panels ---------- */
.tp .panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.tp .panel-head h2 { margin: 0 0 .15rem; font-family: Fraunces, Georgia, serif; font-size: 1.6rem; }
.tp .panel-head p { margin: 0; color: var(--muted); font-size: .95rem; max-width: 60ch; }
.tp .desc-edit { display: grid; gap: .5rem; max-width: 520px; }
.tp .desc-edit .row { display: flex; gap: .5rem; }
.tp .empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-card); padding: 2rem 1.25rem; text-align: center; color: var(--muted); }

/* ---------- Buttons and controls ---------- */
.tp .btn {
  font: inherit; font-weight: 600; font-size: .92rem; border: 1px solid transparent; border-radius: var(--r-ctl);
  padding: .6rem 1.1rem; cursor: pointer; background: var(--accent); color: #fff; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; transition: opacity .15s ease, background .15s ease;
}
.tp .btn:hover { opacity: .92; }
.tp .btn:disabled { opacity: .5; cursor: default; }
.tp .btn.sm { font-size: .8rem; padding: .42rem .8rem; border-radius: 8px; }
.tp .btn.ghost { background: none; color: var(--ink); border-color: var(--line); }
.tp .btn.ghost:hover:not(:disabled) { background: rgba(15, 41, 37, .04); opacity: 1; }
.tp .btn.ghost[aria-pressed="true"] { background: var(--tint); border-color: var(--accent); color: var(--accent); }
.tp .btn.on-dark { color: #fff; border-color: #8fd4da; }
.tp .btn.on-dark:hover { background: rgba(255, 255, 255, .1); }
.tp .btn.light { background: #8fd4da; color: var(--deep); }
.tp .btn.wa { background: var(--wa); color: #fff; }
.tp .btn.wa:hover { background: var(--wa-hover); opacity: 1; }
.tp .btn.danger { background: none; color: var(--danger); border-color: var(--danger); }
.tp .btn.danger:hover { background: #fdf0f2; opacity: 1; }
.tp .link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: var(--accent); text-decoration: underline; cursor: pointer; }
.tp .chip { font: inherit; font-size: .85rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .85rem; cursor: pointer; }
.tp .chip:hover { border-color: var(--ink); }

.tp label { display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; font-weight: 600; color: var(--ink); }
.tp input:not([type="checkbox"]):not([type="range"]):not([type="color"]),
.tp select,
.tp textarea {
  font: inherit; font-weight: 400; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--bg); color: var(--ink); width: 100%;
}
.tp input[type="color"] { width: 100%; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--bg); }
.tp label.check { flex-direction: row; align-items: center; gap: .5rem; }
.tp .err { color: var(--danger); font-size: .85rem; margin: 0; min-height: 1.1em; }

/* ---------- Product cards ---------- */
.tp .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.4rem; align-items: stretch; }

.tp .card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-card); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.tp .card:hover { border-color: var(--accent); box-shadow: 0 10px 28px rgba(15, 41, 37, .09); }
@media (hover: hover) {
  .tp .card:not(.skeleton):hover { transform: translateY(-6px); }
}

.tp .stage { position: relative; }
.tp .thumb-wrap {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; overflow: hidden;
  height: var(--tp-img-h, 230px); border-radius: 13px 13px 0 0;
  background: radial-gradient(circle at 50% 38%, #ffffff 0, var(--tint) 72%);
}
.tp .thumb { display: block; width: 100%; height: 100%; object-fit: contain; padding: 1rem; mix-blend-mode: multiply; transition: transform .35s ease; }
.tp .thumb-wrap:hover .thumb { transform: scale(1.06); }
.tp .thumb.ph { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .85rem; }

.tp .reveal {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: .15rem; text-align: left;
  padding: .8rem 1rem; background: rgba(11, 58, 66, .94); color: #fff; font-size: .82rem; line-height: 1.4;
  transform: translateY(101%); transition: transform .25s ease;
}
.tp .reveal b { color: #8fd4da; font-weight: 600; margin-right: .3rem; }
.tp .reveal-cta { margin-top: .25rem; font-weight: 600; text-decoration: underline; }
.tp .card:hover .reveal, .tp .card:focus-within .reveal { transform: none; }

/* On touch screens there is no hover, so composition and pack show in the card body instead. */
@media (hover: none) { .tp .reveal { display: none; } }
@media (hover: hover) {
  .tp .meta-body { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.tp .tags { position: absolute; top: .7rem; left: .7rem; display: flex; gap: .35rem; flex-wrap: wrap; pointer-events: none; }
.tp .tag { font-size: .72rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; color: #fff; }
.tp .tag-new { background: var(--accent); }
.tp .tag-popular { background: #a85a00; }

.tp .card-body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem .5rem; flex: 1; }
.tp .card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.tp .card h3 { margin: 0; font-size: 1.12rem; color: var(--ink); overflow-wrap: anywhere; }
.tp .title-btn { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.tp .title-btn:hover { text-decoration: underline; }
.tp .badge-form { background: var(--tint); color: var(--accent); font-size: .78rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; white-space: nowrap; }
.tp .meta { margin: 0; color: var(--muted); font-size: .88rem; }
.tp .meta strong { color: var(--ink); font-weight: 600; }
.tp .desc { margin: .15rem 0 0; font-size: .9rem; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.tp .card-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .75rem 1.1rem 1.1rem; margin-top: auto; }

.tp .card.skeleton { min-height: 360px; background: linear-gradient(90deg, #eef4f2 25%, #f8fbfa 37%, #eef4f2 63%); background-size: 400% 100%; animation: tp-shimmer 1.4s ease infinite; }
@keyframes tp-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Admin: manage menu ---------- */
.tp .admin-tools { position: absolute; top: .6rem; right: .6rem; z-index: 5; display: flex; align-items: flex-start; gap: .35rem; }
.tp details.manage { position: relative; }
.tp .drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: 999px; background: rgba(255, 255, 255, .95); border: 1px solid var(--line); color: var(--ink); cursor: grab; }
.tp .drag-handle:active { cursor: grabbing; }
.tp details.manage summary { list-style: none; cursor: pointer; background: rgba(255, 255, 255, .95); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .7rem; font-size: .8rem; font-weight: 600; color: var(--ink); }
.tp details.manage summary::-webkit-details-marker { display: none; }
.tp .manage-menu { position: absolute; right: 0; top: calc(100% + .3rem); min-width: 170px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); box-shadow: 0 8px 24px rgba(15, 41, 37, .12); padding: .3rem; display: flex; flex-direction: column; }
.tp .manage-menu button { font: inherit; font-size: .88rem; text-align: left; background: none; border: 0; padding: .5rem .65rem; border-radius: 7px; cursor: pointer; color: var(--ink); }
.tp .manage-menu button:hover:not(:disabled) { background: var(--bg); }
.tp .manage-menu button:disabled { opacity: .4; cursor: default; }
.tp .manage-menu button.danger { color: var(--danger); }
.tp .manage-menu .hint { margin: .2rem .65rem .4rem; font-size: .75rem; color: var(--muted); }

.tp .admin-line { margin-top: 2.5rem; display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }

/* ---------- Prescription line, wide cards, drag states ---------- */
.tp .rx-line { margin: 0; font-size: .85rem; font-weight: 700; color: var(--cardiac); }
.tp .reveal .rx-line { color: #ffb4c0; }
.tp .card.wide { grid-column: span 2; }
.tp .card.dragging { opacity: .45; }
.tp .card.drop-before { box-shadow: -5px 0 0 var(--accent); }
.tp .card.drop-after { box-shadow: 5px 0 0 var(--accent); }

/* ---------- Trademark symbol ---------- */
.tp sup.tm { position: relative; top: -.5em; vertical-align: baseline; font-size: .55em; line-height: 0; font-weight: 400; margin-left: .1em; text-decoration: none; }
.tp #productForm label.check { align-self: end; padding-bottom: .6rem; }

/* ---------- QR code ---------- */
.tp .qr-box { display: flex; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.tp .qr-img { width: 112px; height: 112px; flex: none; border: 1px solid var(--line); border-radius: 8px; background: #fff; image-rendering: pixelated; }
.tp .qr-cap { margin: 0 0 .5rem; font-size: .85rem; color: var(--muted); }

/* ---------- Manage menu link ---------- */
.tp .manage-menu .menu-link { font: inherit; font-size: .88rem; text-align: left; display: block; padding: .5rem .65rem; border-radius: 7px; color: var(--ink); text-decoration: none; }
.tp .manage-menu .menu-link:hover { background: var(--bg); }

/* ---------- Single product page ---------- */
.tp.tp-single { padding: 2rem 1.25rem 3rem; }
.tp .sp { max-width: 980px; margin: 0 auto; }
.tp .sp-back { margin: 0 0 1rem; font-size: .92rem; }
.tp .sp-back a { color: var(--accent); font-weight: 600; text-decoration: none; }
.tp .sp-back a:hover { text-decoration: underline; }
.tp .sp-card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--r-card); overflow: hidden; }
.tp .sp-card .qv-media { min-height: 0; height: calc(var(--tp-img-h, 230px) * 1.6); }
.tp .sp-card .qv-img { max-height: none; height: 100%; }
.tp .sp-card h1 { margin: 0; font-family: Fraunces, Georgia, serif; font-size: clamp(1.6rem, 3.5vw, 2.2rem); color: var(--ink); }
.tp .sp .disclaimer { margin-top: 1.5rem; }
@media (max-width: 640px) {
  .tp.tp-single { padding: 1rem .75rem 2rem; }
  .tp .sp-card .qv-media { height: calc(var(--tp-img-h, 230px) * 1.2); }
}

/* ---------- Franchise band ---------- */
.tp .franchise { margin-top: 3rem; background: var(--deep); color: #fff; border-radius: var(--r-card); padding: 2rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.tp .franchise h2 { margin: 0 0 .35rem; font-family: Fraunces, Georgia, serif; font-size: 1.5rem; color: #fff; }
.tp .franchise p { margin: 0; color: #cfe5e7; max-width: 60ch; }

/* ---------- Enquiry tray ---------- */
.tp .tray {
  position: fixed; left: 50%; bottom: 1.1rem; transform: translateX(-50%); z-index: 99990;
  display: flex; align-items: center; gap: .75rem; padding: .6rem .7rem .6rem 1.1rem; max-width: calc(100vw - 1.5rem);
  background: var(--deep); color: #fff; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-size: .88rem; font-weight: 600;
}

/* ---------- Dialogs ---------- */
.tp dialog {
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink);
  padding: 0; width: min(94vw, 480px); max-height: 92vh; overflow: auto; box-shadow: 0 20px 40px rgba(0, 0, 0, .18);
}
.tp dialog::backdrop { background: rgba(0, 0, 0, .5); backdrop-filter: blur(2px); }
.tp dialog.dlg-wide { width: min(94vw, 780px); }
.tp dialog.dlg-form { width: min(94vw, 620px); }
.tp dialog h2 { margin: 0; font-family: Fraunces, Georgia, serif; font-size: 1.4rem; }
.tp .pad { padding: 1.5rem; display: grid; gap: 1rem; }
.tp .dlg-close { position: absolute; top: .6rem; right: .7rem; z-index: 2; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink); }

/* Quick view */
.tp .qv { display: grid; grid-template-columns: 1fr 1fr; }
.tp .qv-media { background: radial-gradient(circle at 50% 38%, #fff 0, var(--tint) 72%); display: flex; align-items: center; justify-content: center; min-height: 280px; }
.tp .qv-img { width: 100%; height: 100%; max-height: 440px; object-fit: contain; padding: 1rem; display: block; mix-blend-mode: multiply; }
.tp .qv-info { padding: 1.5rem; display: flex; flex-direction: column; gap: .85rem; }
.tp .chips-row { margin: 0; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.tp .facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; font-size: .92rem; }
.tp .facts dt { color: var(--muted); font-weight: 600; }
.tp .facts dd { margin: 0; overflow-wrap: anywhere; }
.tp .qv-desc { margin: 0; font-size: .95rem; }
.tp .rx-note { margin: 0; font-size: .85rem; color: var(--muted); border-left: 3px solid var(--cardiac); padding-left: .7rem; }
.tp .qv-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.tp .related { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: auto; }
.tp .rel-row { display: flex; gap: .4rem; flex-wrap: wrap; }

/* Enquiry list and compare */
.tp .list-items { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.tp .list-items li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.tp .list-items li div { display: flex; flex-direction: column; min-width: 0; }
.tp .list-items span { font-size: .85rem; color: var(--muted); }
.tp .list-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.tp .cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.tp .cmp { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .9rem; }
.tp .cmp th, .tp .cmp td { padding: .7rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tp .cmp thead th { vertical-align: bottom; background: var(--bg); }
.tp .cmp thead img { display: block; width: 64px; height: 52px; object-fit: contain; margin-bottom: .4rem; }
.tp .cmp tbody th { color: var(--muted); font-weight: 600; width: 9rem; }
.tp .cmp tr.diff td { background: #fff9e0; }
.tp .cmp tr:last-child th, .tp .cmp tr:last-child td { border-bottom: 0; }

/* Product form */
.tp #productForm { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.5rem; }
.tp #productForm h2 { grid-column: 1 / -1; }
.tp .full { grid-column: 1 / -1; }
.tp .actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.tp .actions .push { margin-left: auto; }
.tp .img-row { display: flex; align-items: center; gap: 1rem; }
.tp .img-prev { width: 96px; height: 72px; object-fit: contain; background: var(--tint); border: 1px solid var(--line); border-radius: var(--r-ctl); }

/* ---------- Toast ---------- */
.tp .toast {
  position: fixed; left: 50%; bottom: 4.6rem; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: .7rem 1.2rem; border-radius: var(--r-ctl); font-size: .92rem; max-width: 90vw; z-index: 100000;
  transition: opacity .2s ease, transform .2s ease;
}
.tp .toast.show { opacity: 1; transform: translate(-50%, 0); }
.tp .toast.err { background: var(--danger); }

/* ---------- Responsive ---------- */
@media (max-width: 899px) {
  .tp .layout { grid-template-columns: 1fr; gap: 1rem; }
  .tp .filters { position: static; max-height: none; overflow: visible; }
  .tp .filters summary { display: block; }
  .tp .filters details[open] summary { border-bottom: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .tp .hero { padding: 2.5rem 1.25rem 2rem; }
  .tp .stats { gap: 1rem 2rem; }
  .tp .grid { grid-template-columns: 1fr; }
  .tp .card.wide { grid-column: auto; }
  .tp .qv { grid-template-columns: 1fr; }
  .tp .qv-media { min-height: 200px; }
  .tp #productForm { grid-template-columns: 1fr; }
  .tp .tab { padding: .6rem .7rem; font-size: .9rem; }
  .tp .franchise { padding: 1.5rem; }
  .tp .tray { border-radius: 16px; flex-wrap: wrap; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .tp *, .tp *::before, .tp *::after { transition: none !important; animation: none !important; }
  .tp .card:hover { transform: none !important; }
}
