/* Brand tokens and visual polish. Loaded last, so it sets the look without touching behaviour. */
:root {
  --nx-orange: #E8590C;
  --nx-orange-hover: #CF4F0A;
  --nx-field-green: #2F7D4F;
  --nx-charcoal: #1C1C1C;
  --nx-offwhite: #F7F4EF;
  --nx-sand: #EDE6DC;
  --nx-muted: #6B6660;
  --nx-line: #E2DBD1;
  --nx-danger: #B3412B;
  --nx-ink: var(--nx-charcoal);
  --nx-surface: #FFFFFF;
  --nx-float: var(--nx-charcoal);
  --nx-radius-card: 14px;
  --nx-radius-input: 10px;
  --nx-radius-pill: 999px;
  --nx-speed: 200ms;
  --nx-display: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --nx-ui: 'Manrope', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  /* The logo's original font, from the first version of the site. Also used for the hero wordmark and footer watermark. */
  --nx-wordmark: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  /* The site's existing variables now point at the brand. */
  --orange: var(--nx-orange);
  --orange-dark: var(--nx-orange-hover);
  --green: var(--nx-field-green);
  --green-dark: #26653F;
  --white: #FFFFFF;
  --bg: var(--nx-offwhite);
  --card: var(--nx-surface);
  --shadow: 0 6px 20px rgba(28, 28, 28, 0.07);
  --radius: var(--nx-radius-card);
  --border: var(--nx-line);
  --text-muted: var(--nx-muted);
  --input-bg: #FFFFFF;
  --input-text: var(--nx-charcoal);
  --hover-bg: rgba(232, 89, 12, 0.07);
}

.dark, body.dark {
  --nx-offwhite: #141312;
  --nx-sand: #2A2826;
  --nx-muted: #A59E95;
  --nx-line: #35312D;
  --nx-ink: #F3EFE8;
  --nx-surface: #1F1D1B;
  --nx-float: #2F2C29;
  --bg: #141312;
  --card: #1F1D1B;
  --white: #1F1D1B;
  --border: #35312D;
  --text-muted: #A59E95;
  --input-bg: #1F1D1B;
  --input-text: #F3EFE8;
  --hover-bg: rgba(232, 89, 12, 0.14);
}

body { background: var(--bg); color: var(--nx-ink); font-family: var(--nx-ui); }
button, input, select, textarea { font-family: var(--nx-ui); }

/* ---------- The logo keeps its own colours and font ---------- */
.logo { color: #f57c00; font-family: var(--nx-wordmark); }
.logo span { color: #2e7d32; }

/* ---------- Shared components ---------- */
.btn { border-radius: var(--nx-radius-pill); transition: background-color var(--nx-speed), border-color var(--nx-speed), color var(--nx-speed), transform var(--nx-speed), box-shadow var(--nx-speed); }
.btn-primary { box-shadow: none; }
.btn-primary:hover { background: var(--nx-orange-hover); transform: none; }
.btn-outline { border: 1px solid var(--nx-ink); color: var(--nx-ink); }
.btn-outline:hover { border-color: var(--nx-orange); color: var(--nx-orange); }
.btn-danger { background: var(--nx-danger); }
.btn-danger:hover { background: #963522; }
.btn-google { background: #FFFFFF; color: var(--nx-charcoal); border: 1px solid var(--nx-line); }
.btn-google:hover { background: var(--nx-sand); }
.btn-business { background: var(--nx-charcoal); }
.btn-success, .btn-subscribed { background: var(--nx-field-green); }
.card, .chat-box, .chat-users, .profile-sidebar, .account-content, .supplier-card, .mission-card, .team-card { border-radius: var(--nx-radius-card); }
.form-group input, .form-group select, .form-group textarea, .nxh-search input, .mk-map-search input { border-radius: var(--nx-radius-input); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--nx-orange); box-shadow: 0 0 0 3px rgba(232, 89, 12, 0.14); }
.top-sellers-banner, .featured-supplier { background: var(--nx-charcoal); border-radius: var(--nx-radius-card); }
.mk-stars { color: var(--nx-orange); }

/* ---------- Headings ---------- */
.section-title, .page-header h1 { font-family: var(--nx-display); font-weight: 600; letter-spacing: 0; color: var(--nx-ink); }
.page-header h1 { font-size: clamp(34px, 4vw, 52px); line-height: 1.1; }

.nx-featured-head { display: flex; flex-direction: column; align-items: center; margin: 56px 0 24px; text-align: center; scroll-margin-top: calc(var(--nxh-nav, 112px) + 16px); }
.nx-reveal { opacity: 0; transform: translateY(16px); transition: opacity 250ms ease, transform 250ms ease; }
.nx-reveal.nx-shown { opacity: 1; transform: none; }
.nx-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--nx-orange); }
.nx-title-row { display: flex; align-items: center; justify-content: center; gap: 24px; width: 100%; margin: 8px 0; }
.nx-featured-title { flex: none; margin: 0; font-family: var(--nx-display); font-weight: 600; font-size: clamp(40px, 5vw, 72px); line-height: 1.05; color: var(--nx-ink); white-space: nowrap; }
.nx-featured-title span { font-style: italic; font-weight: 500; color: var(--nx-orange); }
.nx-rule { position: relative; flex: 1 1 0; min-width: 0; max-width: 240px; height: 1px; background: var(--nx-line); }
.nx-rule::after { content: ''; position: absolute; right: 0; top: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--nx-field-green); }
.nx-rule-end::after { left: 0; right: auto; }
.nx-live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--nx-muted); }
.nx-live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--nx-field-green); }
.nx-live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--nx-field-green); animation: nx-pulse 2.4s ease-out infinite; }
@keyframes nx-pulse { to { transform: scale(2.6); opacity: 0; } }

/* ---------- Filter pills ---------- */
#mkHomeFilters { justify-content: center; margin: 0 0 32px; padding: 0; border: 0; background: transparent; box-shadow: none; }
#mkHomeFilters .filter-group { justify-content: center; flex-wrap: wrap; gap: 8px; }
#mkHomeFilters .filter-group > i { color: var(--nx-muted) !important; margin-right: 4px; }
#mkHomeFilters .country-select-wrap { display: contents; }
#mkHomeFilters .country-flag { display: none; }
.nx-clear-filters { min-height: 44px; padding: 0 16px; border: 0; background: transparent; color: var(--nx-orange); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; transition: color var(--nx-speed); }
.nx-clear-filters:hover { color: var(--nx-orange-hover); }
.nx-clear-filters[hidden] { display: none; }
.nx-clear-filters:focus-visible { outline: 2px solid var(--nx-orange); outline-offset: 2px; border-radius: var(--nx-radius-input); }
.mk-empty .btn { display: block; margin: 16px auto 0; }
#mkHomeFilters select, #mkHomeFilters #cityFilter, #page-hire .filter-bar select, #page-wanted .filter-bar select, #page-buy .filter-bar select {
  min-height: 44px;
  padding: 0 40px 0 18px;
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius-pill);
  background: var(--nx-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236B6660' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 4.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E") no-repeat right 16px center;
  color: var(--nx-ink);
  font-size: 14px;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color var(--nx-speed), color var(--nx-speed);
}
#mkHomeFilters select:focus, #mkHomeFilters select.mk-active,
#page-hire .filter-bar select:focus, #page-hire .filter-bar select.mk-active,
#page-wanted .filter-bar select:focus, #page-wanted .filter-bar select.mk-active,
#page-buy .filter-bar select:focus, #page-buy .filter-bar select.mk-active { outline: none; border-color: var(--nx-orange); color: var(--nx-orange); }

/* ---------- Listing cards ---------- */
.product-grid { gap: 24px; grid-auto-rows: 1fr; }
.product-grid > .mk-empty, .product-grid > .mk-loading { grid-row: auto; }
.mk-card.product-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--nx-line); border-radius: var(--nx-radius-card); background: var(--nx-surface); box-shadow: none; transition: transform var(--nx-speed), box-shadow var(--nx-speed); }
.mk-card.product-card:hover, .mk-card.product-card:focus-visible { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(28, 28, 28, 0.12); outline: none; }
.mk-card .product-img { position: relative; flex: none; width: 100%; height: auto; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 0; background: var(--nx-sand); }
.mk-card .product-img img, .mk-card .product-img video { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 250ms ease; }
.mk-card:hover .product-img img, .mk-card:hover .product-img video { transform: scale(1.04); }
.mk-noimage { min-height: 0; background: var(--nx-sand); }
.mk-card .product-body { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 16px; }
.mk-card .product-body h4 { margin: 0 0 4px; font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--nx-ink); overflow-wrap: anywhere; }
.mk-card .product-meta { margin: 0; font-size: 13px; color: var(--nx-muted); }
.mk-card .product-meta i { font-size: 11px; margin-right: 2px; }
.mk-secondary { font-size: 13px; color: var(--nx-muted); }
.mk-card .product-price { margin: auto 0 0; padding-top: 8px; font-size: 20px; }
.product-price, .mk-price { font-family: var(--nx-ui); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--nx-orange); }
.product-price.mk-price-buy { color: var(--nx-ink); }

.mk-image-badges { position: absolute; top: 12px; left: 12px; z-index: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.mk-tag { padding: 4px 12px; border-radius: var(--nx-radius-pill); font-size: 12px; font-weight: 600; }
.mk-sell { background: var(--nx-orange); }
.mk-hire { background: var(--nx-field-green); }
.mk-buy { background: var(--nx-charcoal); }
.dark .mk-buy { background: #3A3633; }
.mk-off { background: var(--nx-muted); }
.mk-note { background: transparent; color: var(--nx-muted); padding-left: 0; font-weight: 500; }
.mk-empty { color: var(--nx-muted); }

/* ---------- Header ---------- */
nav { background: rgba(255, 255, 255, 0.94); border-bottom: 1px solid var(--nx-line); }
body.dark nav { background: rgba(20, 19, 18, 0.95); }
.search-wrap { flex-basis: 520px; }
.search-wrap input { min-height: 46px; padding-top: 0; padding-bottom: 0; border: 1px solid var(--nx-line); border-radius: var(--nx-radius-input); background: var(--input-bg); font-size: 15px; transition: border-color var(--nx-speed), box-shadow var(--nx-speed); }
.search-wrap input:focus { border-color: var(--nx-orange); box-shadow: 0 0 0 3px rgba(232, 89, 12, 0.16); }
.header-right-group { gap: 8px; align-items: center; }
.messages-icon-wrapper, .nx-bell { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; color: var(--nx-ink); font-size: 20px; transition: background-color var(--nx-speed), color var(--nx-speed); }
.messages-icon-wrapper:hover, .nx-bell:hover { background: var(--hover-bg); color: var(--nx-orange); }
.messages-icon-wrapper .chat-badge, .nx-bell span { background: var(--nx-orange); }
.language-selector select { min-height: 40px; border: 1px solid var(--nx-line); border-radius: var(--nx-radius-pill); background-color: var(--input-bg); color: var(--nx-ink); }
.nav-avatar .avatar-fallback { background: var(--nx-sand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%236B6660' stroke-width='1.7' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8.5' r='3.5'/%3E%3Cpath d='M5.5 19.5c1-3.6 3.5-5 6.5-5s5.500 1.400 6.500 5'/%3E%3C/svg%3E") center / 22px no-repeat; color: transparent; font-size: 0; }
.auth-buttons { gap: 8px; }
.auth-buttons .btn { min-height: 40px; padding: 0 20px; border-radius: var(--nx-radius-pill); font-size: 14px; font-weight: 600; box-shadow: none; }
.auth-buttons .btn-primary { border: 1px solid var(--nx-orange); background: var(--nx-orange); color: #fff; }
.auth-buttons .btn-primary:hover { border-color: var(--nx-orange-hover); background: var(--nx-orange-hover); }
.auth-buttons .btn-outline { border: 1px solid var(--nx-ink); background: transparent; color: var(--nx-ink); }
.hamburger span { background: var(--nx-ink); }
.country-select-wrap select, #cityFilter { color: var(--nx-ink); }

/* ---------- Floating buttons: one family, stacked on one centre line ---------- */
.floating-cart, .dark-toggle, .mk-help-button { color: #FFFFFF; border: 0; background: var(--nx-float); box-shadow: 0 6px 18px rgba(28, 28, 28, 0.22); transition: transform var(--nx-speed), background-color var(--nx-speed), opacity var(--nx-speed), width var(--nx-speed); }
.floating-cart:hover, .dark-toggle:hover, .mk-help-button:hover { transform: translateY(-2px); background: var(--nx-orange); color: #FFFFFF; }
.floating-cart { right: 24px; bottom: 24px; width: 56px; height: 56px; justify-content: flex-end; padding: 0 16px; overflow: visible; border-radius: var(--nx-radius-pill); font-size: 14px; font-weight: 600; }
.floating-cart svg { flex: none; width: 24px; height: 24px; }
.nx-cart-label { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width var(--nx-speed), opacity var(--nx-speed), margin var(--nx-speed); }
@media (hover: hover) {
  .floating-cart:hover { width: 104px; }
  .floating-cart:hover .nx-cart-label { max-width: 44px; margin-right: 8px; opacity: 1; }
}
.nx-cart-count { position: absolute; top: -2px; right: -2px; display: flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px; box-sizing: border-box; border: 2px solid var(--bg); border-radius: var(--nx-radius-pill); background: var(--nx-orange); color: #FFFFFF; font-size: 11px; font-weight: 700; }
.nx-cart-count[hidden] { display: none; }
.floating-cart:hover .nx-cart-count { background: var(--nx-charcoal); }
.dark-toggle, .mk-help-button { right: 30px; width: 44px; height: 44px; border-radius: 50%; font-size: 16px; }
.dark-toggle { bottom: 92px; }
.mk-help-button { bottom: 148px; }

/* ---------- Footer ---------- */
.site-meta-section { position: relative; overflow: hidden; margin-top: 64px; border-top: 3px solid var(--nx-field-green); background: #1C1C1C; color: #F7F4EF; }
body.dark .site-meta-section { background: #0F0E0D; }
.site-meta-section > *:not(.nx-watermark) { position: relative; z-index: 1; }
.nx-watermark { position: absolute; left: 50%; bottom: -0.2em; z-index: 0; transform: translateX(-50%); font-family: var(--nx-wordmark); font-weight: 700; font-size: 20vw; line-height: 0.9; letter-spacing: -0.02em; white-space: nowrap; text-transform: uppercase; color: #F7F4EF; opacity: 0.06; pointer-events: none; user-select: none; -webkit-user-select: none; }
.site-meta-section .meta-brand p, .site-meta-section ul li a, .site-meta-section .meta-bottom, .site-meta-section .meta-bottom .meta-legal-links a { color: rgba(247, 244, 239, 0.78); transition: color var(--nx-speed); }
.site-meta-section h4 { color: #F7F4EF; }
.site-meta-section ul li a:hover, .site-meta-section .meta-bottom .meta-legal-links a:hover { padding-left: 0; color: var(--nx-orange); }
.site-meta-section .meta-social a { transition: background-color var(--nx-speed), color var(--nx-speed); }
.site-meta-section .meta-social a:hover { background: var(--nx-orange); color: #FFFFFF; }

@media (max-width: 600px) {
  .nx-featured-head { margin-top: 40px; }
  .nx-title-row { gap: 12px; }
  .nx-featured-title { flex: 0 1 auto; white-space: normal; }
  .nx-rule { flex-basis: 16px; }
  .product-grid { gap: 16px; }
  .mk-card .product-body { padding: 12px; }
  .mk-card .product-body h4 { font-size: 15px; }
  .mk-card .product-price { font-size: 17px; }
  .mk-image-badges { top: 8px; left: 8px; }
  .auth-buttons .btn { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .nx-live-dot::after { animation: none; }
  .nx-reveal { opacity: 1; transform: none; transition: none; }
  .mk-card.product-card, .mk-card .product-img img, .floating-cart, .dark-toggle, .mk-help-button { transition: none; }
  .mk-card:hover .product-img img { transform: none; }
}
.site-meta-section .meta-brand .logo span { color: #2e7d32; }

/* Dim the photo of an unavailable item, but keep its badges crisp. */
.mk-unavailable .product-img, .mk-unavailable .mk-my-image { opacity: 1; filter: none; }
.mk-unavailable .product-img img, .mk-unavailable .product-img video, .mk-unavailable .mk-my-image img { opacity: 0.55; filter: grayscale(0.6); }
.mk-unavailable .mk-noimage { opacity: 0.6; }

/* Keeps the footer's last links clear of the floating buttons. */
@media (min-width: 769px) {
  .site-meta-section .meta-bottom { padding-right: 96px; }
}
@media (max-width: 768px) {
  .site-meta-section .meta-bottom { padding-bottom: 96px; }
}
.floating-cart, .dark-toggle, .mk-help-button { box-shadow: 0 6px 18px rgba(28, 28, 28, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.14); }
.nav-avatar img, .nav-avatar .avatar-fallback { border-color: var(--nx-line); }
.site-meta-section .meta-brand .logo { color: #f57c00; }
.country-flag[style*="all.png"] { display: none; }
@media (max-width: 768px) {
  .site-meta-section .meta-bottom { padding-bottom: 272px; }
}
/* ---------- Page headings: same look, with one real H1 on each page ---------- */
.nx-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.page-header .nx-page-title { margin: 0; font-family: var(--nx-display); font-weight: 600; font-size: clamp(34px, 4vw, 52px); letter-spacing: 0; line-height: 1.1; color: var(--nx-ink); }
.login-header .nx-page-title { margin: 0; font-size: 1.8rem; font-weight: 700; }
.nx-page > .nx-page-title { font-size: 34px; font-weight: 700; letter-spacing: -0.5px; margin: 8px 4px 16px; line-height: 1.15; }
.nx-ssr-listing { max-width: 800px; margin: 24px auto; }
.nx-ssr-listing img { display: block; max-width: 100%; height: auto; border-radius: var(--nx-radius-card); }

/* Placeholder cards while the listings load, so nothing jumps when they arrive. */
.nx-skeleton-card { min-height: 420px; border: 1px solid var(--nx-line); border-radius: var(--nx-radius-card); background: linear-gradient(var(--nx-sand), var(--nx-sand)) top / 100% 58% no-repeat, var(--nx-surface); }
@media (max-width: 600px) { .nx-skeleton-card { min-height: 300px; } }
