/* =========================================================
   xpressmac.online — live-data additions on top of xpressmac.css
   (loading skeletons, empty states, real-photo tweaks)
   ========================================================= */

[hidden] { display: none !important; }

/* inputs in the parcel route use the same look as the prototype selects */
.parcel__route input { height: 42px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 12px; font: 500 14px 'Inter', sans-serif; color: var(--ink, #111827); background: #fff; outline: 0; width: 100%; }
.parcel__route input:focus { border-color: var(--green); }
.parcel__route input[readonly] { background: var(--bg); }
.parcel__swap { display: grid; place-items: center; cursor: default; }
.popt { position: relative; }
.popt span img { width: 26px; height: 26px; object-fit: contain; margin-bottom: 4px; }

/* hero category list: Firestore photos instead of line icons */
.hero__cats a img.xm-cat-img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; opacity: 1; flex: none; background: #F3F4F6; }
.allcats__menu a img.xm-cat-img, .catnav__links img { width: 20px; height: 20px; border-radius: 5px; object-fit: cover; }
.allcats__menu a.is-current, .hero__cats a.is-current { color: var(--green-d); font-weight: 600; background: var(--brand-tint-2); }
.catnav__links a.is-current { border-bottom-color: var(--green); }

/* real product photos: keep them tidy regardless of original size */
.mini__img img, .card__img img, .dcard__img > img, .rcard__img > img { background: #fff; }
.ccard__img { background: linear-gradient(135deg, #EEF2F7, #F8FAFC); }
.ccard__img img { object-fit: contain; padding: 14px; }
.mini__title, .card__title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card__sold { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xm-new { display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--ok, #0B8A5E); background: var(--ok-bg, #E7F7EF); padding: 1px 6px; border-radius: 4px; }
.card, .mini, .dcard, .rcard, .ccard { cursor: pointer; }
.slide--ad img { background: #fff; }

/* loading skeletons */
@keyframes xm-shimmer { 0% { background-position: -300px 0; } 100% { background-position: 300px 0; } }
.xm-sk-box, .xm-sk-line { background: linear-gradient(90deg, #EEF0F3 0, #F7F8FA 50%, #EEF0F3 100%); background-size: 600px 100%; animation: xm-shimmer 1.2s linear infinite; }
.xm-sk-line { height: 12px; border-radius: 6px; margin: 10px 0 0; list-style: none; }
.hero__cats .xm-sk-line { margin: 12px 16px 0; }
.xm-sk-line--short { width: 55%; }
.xm-sk { pointer-events: none; }

/* empty state */
.xm-empty { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); margin-top: 8px; }

/* toast */
.xm-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 200; transition: transform .3s; font-weight: 500; max-width: calc(100% - 32px); }
.xm-toast.is-on { transform: translate(-50%, 0); visibility: visible; }
.xm-toast:not(.is-on) { visibility: hidden; }

/* busy state while switching section */
body.xm-busy { cursor: progress; }
body.xm-busy main { opacity: .6; transition: opacity .2s; }

@media (prefers-reduced-motion: reduce) { .xm-sk-box, .xm-sk-line { animation: none; } }
