@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400..800;1,9..40,400..800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #F2F4F7;
  --surface: #ffffff;
  --surface-alt: #E2E8F0;
  --ink: #101828;
  --ink-light: #344054;
  --ink-muted: #667085;
  --brand: #F26419;
  --brand-hover: #D1520F;
  --border: #D0D5DD;
  --border-dark: #98A2B3;
  --success: #12B886;
  --danger: #EF476F;
  --accent-green: #29BF12;

  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 8px;

  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); }
body.dialog-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a, summary { cursor: pointer; touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent-green); outline-offset: 2px;
}
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.skip-link {
  position: absolute; left: 16px; top: -90px;
  background: var(--brand); color: #fff; padding: 10px 16px;
  z-index: 100; font-weight: 700; text-decoration: none; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 16px; }

.mrx-market { min-height: 100vh; display: flex; flex-direction: column; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 60px); }

/* Header */
.market-nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  height: 80px; padding: 0 clamp(20px, 5vw, 60px);
  background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-left { display: flex; align-items: center; }
.nav-center { display: flex; justify-content: center; flex: 1; }
.nav-right { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }

.market-logo { text-decoration: none; }
.logo-text { font-family: var(--font-display); font-size: 26px; font-weight: 900; letter-spacing: -0.5px; color: var(--ink); }
.tenant-logo { height: 36px; max-width: 160px; object-fit: contain; }

.nav-links { display: flex; gap: 32px; }
.nav-links a { font-size: 15px; font-weight: 700; color: var(--ink-light); text-decoration: none; transition: 0.2s; padding: 9px 4px; }
.nav-links a:hover { color: var(--brand); }

.basket {
  display: flex; align-items: center; gap: 8px; background: var(--surface-alt);
  border: none; border-radius: 99px;
  padding: 8px 16px; font-size: 14px; font-weight: 700; color: var(--ink);
  transition: 0.2s;
}
.basket:hover { background: var(--border); transform: translateY(-1px); }
.basket-count {
  background: var(--accent-green); color: #fff; border-radius: 12px;
  padding: 2px 8px; font-size: 12px; font-weight: 800;
}

/* Trust Strip */
.trust-strip {
  background: var(--ink);
  color: #fff;
  padding: 12px 0;
  border-bottom: 4px solid var(--accent-green);
}
.trust-items {
  display: flex; gap: 40px; list-style: none; margin: 0; padding: 0;
  flex-wrap: wrap; justify-content: center;
}
.trust-items li {
  display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.trust-items svg { color: var(--accent-green); width: 18px; height: 18px; }

/* Top Discovery Area */
.store-top-discovery {
  padding: 60px 0;
}
.discovery-grid {
  display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: stretch;
}
.discovery-main-panel {
  background: var(--brand);
  border-radius: var(--radius-lg);
  padding: 48px;
  color: #fff;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--brand) 30%, transparent);
}
.discovery-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800; margin: 0 0 32px; line-height: 1.1; letter-spacing: -0.02em;
  position: relative; z-index: 2; text-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.discovery-filters {
  position: relative; z-index: 2; display: flex; flex-direction: column; gap: 24px;
}
.search-primary {
  display: flex; align-items: center; background: #fff;
  border-radius: var(--radius); padding: 8px 24px; height: 64px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1); transition: transform 0.2s, box-shadow 0.2s;
}
.search-primary:focus-within {
  transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  outline: 3px solid var(--accent-green);
}
.search-primary svg { color: var(--ink-muted); width: 24px; height: 24px; flex-shrink: 0; }
.search-primary input {
  border: none; background: transparent; width: 100%; font-size: 18px; font-weight: 600;
  color: var(--ink); padding-left: 16px; outline: none;
}
.search-primary input::placeholder { color: var(--ink-muted); }

.filter-controls-row {
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center;
}
.category-scroller {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px;
}
.category-scroller::-webkit-scrollbar { display: none; }
.category-scroller label {
  background: rgba(255,255,255,0.15); color: #fff; border-radius: 99px;
  padding: 10px 20px; font-size: 14px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: 0.2s; border: 1px solid transparent;
}
.category-scroller label:hover { background: rgba(255,255,255,0.25); }
.category-scroller label.active { background: #fff; color: var(--brand); }
.category-scroller label input { display: none; }

.secondary-filters { display: flex; align-items: center; gap: 12px; }
.secondary-filters select {
  background: rgba(255,255,255,0.2); color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 10px 16px; font-weight: 700; cursor: pointer; outline: none; font-size: 14px;
}
.secondary-filters select option { color: var(--ink); }

.toggle-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle-label input { display: none; }
.toggle-switch {
  width: 44px; height: 24px; background: rgba(255,255,255,0.3);
  border-radius: 20px; position: relative; transition: 0.2s;
}
.toggle-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: 0.2s;
}
.toggle-label input:checked + .toggle-switch { background: var(--success); }
.toggle-label input:checked + .toggle-switch::after { transform: translateX(20px); }

.reset-btn {
  background: rgba(255,255,255,0.2); border: none; color: #fff; padding: 10px;
  border-radius: var(--radius-sm); cursor: pointer; transition: 0.2s; display: flex; align-items: center;
}
.reset-btn:hover { background: rgba(255,255,255,0.3); }
.reset-btn svg { width: 18px; height: 18px; }

/* Best Hire Feature */
.best-hire-rect {
  background: var(--surface); border-radius: var(--radius-lg); padding: 24px;
  display: flex; flex-direction: column; box-shadow: 0 12px 48px rgba(16, 24, 40, 0.06);
  border: 1px solid var(--border); text-decoration: none; transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative; overflow: hidden;
}
.best-hire-rect::before {
  content: ""; position: absolute; top: 0; right: 0; width: 250px; height: 250px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-green) 15%, transparent) 0%, transparent 70%);
  pointer-events: none;
}
.best-hire-rect:hover { border-color: var(--accent-green); transform: translateY(-4px); box-shadow: 0 20px 56px rgba(16, 24, 40, 0.1); }
.best-hire-label {
  display: inline-flex; align-items: center; gap: 6px; background: var(--accent-green);
  color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.05em; padding: 6px 12px;
  border-radius: 99px; align-self: flex-start; margin-bottom: 24px; z-index: 2;
}
.best-hire-link { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: inherit; z-index: 2; }
.best-hire-img-wrap {
  flex: 1; background: var(--surface-alt); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; padding: 24px; margin-bottom: 24px;
}
.best-hire-img-wrap img { max-width: 100%; max-height: 240px; object-fit: contain; mix-blend-mode: multiply; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.best-hire-rect:hover .best-hire-img-wrap img { transform: scale(1.08); }
.best-hire-details { display: flex; flex-direction: column; gap: 4px; }
.best-hire-cat { font-size: 12px; font-weight: 800; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.best-hire-name { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1.1; margin-bottom: 4px; }
.best-hire-price { font-size: 18px; font-weight: 800; color: var(--brand); }
.best-hire-rect.empty { justify-content: center; }

/* Sections */
.featured-section { margin: 60px auto; }
.section-header { margin-bottom: 32px; display: flex; flex-direction: column; gap: 8px; }
.section-header h2 { font-family: var(--font-display); font-size: 32px; font-weight: 800; color: var(--ink); margin: 0; }
.section-header p { font-size: 16px; color: var(--ink-muted); margin: 0; }

/* Catalogue Grid */
.catalogue-main { padding-bottom: 100px; }
.catalogue-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.catalogue-meta {
  display: flex; justify-content: space-between; width: 100%;
  font-size: 14px; color: var(--ink-muted); font-weight: 700;
}
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px;
}

/* Product Card */
.product-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 4px 12px rgba(16, 24, 40, 0.03);
  position: relative; animation: rise 0.5s both; animation-delay: var(--delay, 0ms);
  cursor: pointer;
}
.product-card:hover {
  border-color: var(--accent-green); box-shadow: 0 12px 32px rgba(16, 24, 40, 0.08); transform: translateY(-4px);
}
.card-image-wrap {
  aspect-ratio: 1.75; background: var(--surface-alt); padding: 12px;
  display: flex; align-items: center; justify-content: center; position: relative; text-decoration: none;
}
.card-image-wrap img {
  max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .card-image-wrap img { transform: scale(1.08); }
.status-badge {
  position: absolute; top: 12px; left: 12px; background: #fff; color: var(--ink);
  padding: 4px 10px; font-size: 11px; font-weight: 800; border-radius: 99px;
  text-transform: uppercase; letter-spacing: 0.5px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); z-index: 2;
}
.status-badge.unavailable { background: var(--danger); color: #fff; }
.promo-ribbon {
  position: absolute; top: 12px; right: 12px; background: var(--accent-green); color: #fff;
  padding: 4px 10px; font-size: 11px; font-weight: 800; border-radius: 99px; text-transform: uppercase; z-index: 2;
}

.card-info { padding: 11px; display: flex; flex-direction: column; flex: 1; }
.card-category { color: var(--ink-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; display: block;}
.card-title { font-family: var(--font-display); font-size: 15px; font-weight: 800; margin: 0 0 5px; line-height: 1.15; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--brand); }
.card-desc { font-size: 12px; color: var(--ink-light); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 9px; line-height: 1.35; }
.card-bottom {
  margin-top: auto; display: flex; justify-content: space-between; align-items: center;
  padding-top: 8px; border-top: 1px dashed var(--border);
}
.price-amount { font-size: 16px; font-weight: 900; color: var(--ink); }
.price-unit { font-size: 11px; color: var(--ink-muted); font-weight: 600; }
.add-button {
  background: var(--surface-alt); color: var(--ink); border: none; text-decoration: none;
  padding: 7px 11px; font-size: 12px; font-weight: 800; border-radius: 99px; cursor: pointer; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 601px) {
  .store-top-discovery { padding: 18px 0 28px; }
  .discovery-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 14px;
  }
  .discovery-main-panel { padding: 16px 20px; }
  .discovery-title {
    font-size: clamp(24px, 3vw, 30px);
    margin-bottom: 11px;
  }
  .discovery-filters { gap: 10px; }
  .search-primary {
    height: 42px;
    padding: 4px 14px;
  }
  .search-primary svg { height: 18px; width: 18px; }
  .search-primary input {
    font-size: 14px;
    padding-left: 10px;
  }
  .filter-controls-row { gap: 8px; }
  .category-scroller label {
    font-size: 11px;
    padding: 6px 10px;
  }
  .secondary-filters select {
    font-size: 11px;
    padding: 6px 9px;
  }
  .reset-btn { padding: 6px; }
  .best-hire-rect { padding: 12px; }
  .best-hire-label {
    font-size: 10px;
    margin-bottom: 8px;
    padding: 4px 8px;
  }
  .best-hire-img-wrap {
    margin-bottom: 8px;
    padding: 8px;
  }
  .best-hire-img-wrap img { max-height: 92px; }
  .best-hire-name { font-size: 18px; }
  .best-hire-price { font-size: 14px; }
}
.add-button:hover:not(:disabled) {
  background: var(--brand); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(242, 100, 25, 0.2);
}
.add-button:disabled { opacity: 0.5; cursor: not-allowed; }

.price-was { text-decoration: line-through; color: var(--ink-muted); font-size: 0.8em; margin-right: 4px; font-weight: 700; }
.price-sale { color: var(--danger); font-weight: 900; }

.empty-state { text-align: center; padding: 100px 0; }
.empty-state svg { width: 48px; height: 48px; color: var(--border-dark); margin-bottom: 20px; }
.empty-state h3 { font-family: var(--font-display); font-size: 28px; font-weight: 800; margin-bottom: 12px; color: var(--ink); }
.empty-state p { color: var(--ink-muted); font-size: 16px; margin-bottom: 24px; }

/* Dialog */
.product-dialog {
  border: none; padding: 0; width: 100%; max-width: 1000px;
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(16, 24, 40, 0.15); margin: auto;
  max-height: 90vh; display: none; flex-direction: column;
}
.product-dialog[open] { display: flex; }
.product-dialog::backdrop { background: rgba(16, 24, 40, 0.7); backdrop-filter: blur(8px); }
.dialog-close {
  position: absolute; top: 24px; right: 24px; z-index: 10;
  background: var(--surface); border: 1px solid var(--border);
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink-muted); transition: all 0.2s; box-shadow: 0 4px 12px rgba(0,0,0,0.05); cursor: pointer;
}
.dialog-close:hover { color: var(--ink); border-color: var(--ink); transform: scale(1.05); }

.dialog-layout { display: grid; grid-template-columns: 1.2fr 1fr; flex: 1; overflow: hidden; }
.dialog-gallery { padding: 48px; background: var(--surface-alt); border-right: 1px solid var(--border); overflow-y: auto; }
.dialog-hero-photo {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border);
  padding: 32px; margin-bottom: 24px; box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.dialog-hero-photo img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.product-gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 40px; }
.product-gallery-thumb {
  aspect-ratio: 1; background: var(--surface); border: 1px solid var(--border); padding: 0;
  border-radius: var(--radius-sm); transition: 0.2s; overflow: hidden; cursor: pointer;
}
.product-gallery-thumb:hover { border-color: var(--brand); transform: translateY(-2px); }
.product-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.dialog-details { padding: 48px; overflow-y: auto; }
.dialog-sku {
  font-size: 12px; color: var(--ink-muted); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 12px; display: block;
}
.dialog-header h2 { font-family: var(--font-display); font-size: 36px; font-weight: 800; line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.5px; color: var(--ink); }
.dialog-desc { font-size: 16px; line-height: 1.6; color: var(--ink-light); margin: 0 0 32px; }
.dialog-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 24px; }
.resource-highlights { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.resource-highlights span { background: #e9f2ef; color: #164b43; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; }
.card-highlights { margin: 4px 0 2px; color: #164b43; font-size: 11px; font-weight: 800; line-height: 1.35; }
.resource-specifications dl { margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; }
.resource-specifications dl div { display: grid; grid-template-columns: minmax(90px,1fr) 1.2fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.resource-specifications dt { color: var(--ink-light); }
.resource-specifications dd { margin: 0; font-weight: 800; text-align: right; }
.dialog-price strong { font-size: 40px; font-weight: 900; color: var(--ink); letter-spacing: -1px; }
.dialog-price .price-suffix { font-size: 14px; color: var(--ink-muted); font-weight: 600; }
.promo-badge {
  display: inline-block; background: var(--accent-green); color: #fff;
  padding: 6px 12px; border-radius: 99px; font-size: 12px; font-weight: 800; text-transform: uppercase; margin-top: -12px; margin-bottom: 24px;
}

.pricing-options {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; margin-bottom: 24px;
}
.pricing-options h3, .info-section h3 {
  font-family: var(--font-display); font-size: 20px; font-weight: 800; margin: 0 0 20px; color: var(--ink);
}
.info-section h3 { border-bottom: 2px solid var(--border); padding-bottom: 12px; }
.rate-card {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--surface-alt); border: 1px solid var(--border);
  padding: 20px; border-radius: var(--radius-sm); margin-bottom: 16px;
}
.rate-card:last-child { margin-bottom: 0; }
.rate-info { display: flex; flex-direction: column; gap: 4px; }
.rate-name { font-weight: 800; font-size: 16px; color: var(--ink); }
.rate-desc { font-size: 14px; color: var(--ink-muted); line-height: 1.5; }
.rate-price { font-size: 24px; font-weight: 900; color: var(--ink); margin-top: 8px; }
.primary-cta {
  background: var(--brand); color: #fff; border: none; text-decoration: none;
  padding: 16px 24px; font-size: 16px; font-weight: 700; border-radius: 99px; width: 100%;
  cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 10px; transition: all 0.2s;
}
.primary-cta:hover:not(:disabled) { background: var(--brand-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(242, 100, 25, 0.2); }
.primary-cta:disabled { cursor: not-allowed; opacity: .5; }

.billing-details { background: var(--surface-alt); border-radius: var(--radius-sm); padding: 20px; margin-bottom: 24px; }
.billing-details summary { font-size: 14px; font-weight: 800; outline: none; color: var(--ink); }
.rate-list { margin-top: 16px; }
.rate-line { display: flex; justify-content: space-between; font-size: 14px; padding: 10px 0; border-bottom: 1px dashed var(--border-dark); color: var(--ink-light); }
.rate-line:last-child { border-bottom: none; }

.info-section { margin-bottom: 40px; }
.info-section p, .rich-text { font-size: 15px; line-height: 1.7; color: var(--ink-light); margin: 0 0 20px; }
.btn-outline {
  display: inline-block; padding: 12px 24px; border: 2px solid var(--border-dark);
  border-radius: 99px; color: var(--ink); text-decoration: none;
  font-size: 14px; font-weight: 800; transition: 0.2s;
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.ppe-list { padding-left: 24px; font-size: 15px; color: var(--ink-light); margin-bottom: 20px; margin-top: 0; }
.ppe-list li { margin-bottom: 8px; }
.safety-requirements { display: grid; gap: 10px; margin-top: 14px; }
.id-required { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 9px; background: #fff4e5; color: #78400c; }
.id-required span { font-size: 22px; }
.ppe-icon-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ppe-icon-list > span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 12px; font-weight: 800; }
.ppe-icon-list b { font-size: 20px; }

/* Overrides to ensure numeric stock counts are never shown */
.calendar-stock-count { display: none !important; }

/* Support Content */
.support-section { background: var(--surface); border-top: 1px solid var(--border); padding: 100px 0; }
.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.support-block h2 { font-family: var(--font-display); font-size: 32px; font-weight: 800; margin: 0 0 32px; color: var(--ink); letter-spacing: -0.5px; }
.steps-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 24px; }
.steps-list li { font-size: 16px; color: var(--ink-light); display: flex; gap: 16px; align-items: flex-start; line-height: 1.6; }
.steps-list li::before {
  content: "✓"; display: grid; place-items: center; width: 28px; height: 28px;
  background: var(--accent-green); color: #fff; border-radius: 50%; font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.steps-list strong { color: var(--ink); display: block; font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.planner-tags { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.planner-tag {
  display: inline-block; padding: 12px 24px; background: var(--surface-alt);
  border: none; border-radius: 99px;
  font-size: 15px; font-weight: 800; color: var(--ink); text-decoration: none;
  transition: 0.2s;
}
.planner-tag:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.planner-note { font-size: 14px; color: var(--ink-muted); margin: 0; font-weight: 600; }

.events-grid, .articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.event-card, .article-card {
  background: var(--surface); border: 1px solid var(--border); padding: 32px; border-radius: var(--radius); transition: all 0.2s;
}
.event-card:hover, .article-card:hover { border-color: var(--accent-green); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(16,24,40,0.06); }
.event-date { display: inline-block; font-size: 13px; font-weight: 800; color: var(--brand); margin-bottom: 12px; }
.event-title, .article-title { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin: 0 0 12px; color: var(--ink); }
.event-desc, .article-summary { font-size: 15px; color: var(--ink-light); margin: 0; line-height: 1.6; }
.guides-grid { display: flex; flex-wrap: wrap; gap: 12px; }

/* Footer */
.site-footer { background: var(--ink); color: #fff; padding: 80px 0 0; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; padding-bottom: 80px; }
.footer-brand .logo-text { color: #fff; margin-bottom: 20px; display: block; font-size: 32px; }
.footer-brand p { font-size: 16px; line-height: 1.7; max-width: 320px; margin: 0; color: var(--ink-muted); }
.footer-links h4 { color: #fff; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 20px; }
.footer-links a, .footer-links p { color: var(--ink-muted); font-size: 15px; text-decoration: none; margin: 0 0 16px; display: block; line-height: 1.6; font-weight: 600; }
.footer-links a:hover { color: #fff; }

.site-footer > div:not(.container) {
  max-width: 1280px; margin: 0 auto; padding: 40px clamp(20px, 5vw, 60px);
  border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; display: grid; gap: 20px; color: var(--ink-muted);
}
.footer-label { color: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase; margin: 0 0 12px; }
.legal-links a { color: var(--ink-muted); text-decoration: underline; margin-right: 20px; }
.legal-links a:hover { color: #fff; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@media(max-width: 900px) {
  .market-nav { padding: 16px 20px; height: auto; }
  .nav-left { flex: 1 1 auto; min-width: 0; }
  .nav-right { flex: 0 0 auto; gap: 8px; width: auto; }
  .nav-links { display: none; }
  .nav-center { display: none; }

  .discovery-grid { grid-template-columns: 1fr; gap: 24px; }
  .best-hire-rect { min-height: 300px; }
  .best-hire-rect::before { width: 150px; height: 150px; }
  .discovery-title { font-size: 36px; }

  .dialog-layout { display: flex; flex-direction: column; overflow-y: auto; }
  .dialog-gallery { border-right: none; border-bottom: 1px solid var(--border); padding: 32px 24px; overflow-y: visible; }
  .dialog-details { padding: 32px 24px; overflow-y: visible; }
  .product-dialog { max-height: 100vh; border-radius: 0; width: 100%; height: 100%; }
  .dialog-close { top: 16px; right: 16px; }

  .support-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media(max-width: 600px) {
  html,
  body,
  .mrx-market { max-width: 100%; overflow-x: clip; }
  .market-nav { gap: 8px; padding: 8px 12px; min-height: 56px; }
  .logo-text { display: block; font-size: 21px; max-width: calc(100vw - 92px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tenant-logo { max-width: calc(100vw - 92px); }
  .basket { flex: 0 0 auto; gap: 6px; padding: 9px 10px; }
  .basket-label { display: none; }
  .basket-count { min-width: 24px; padding-inline: 6px; text-align: center; }

  .trust-strip { padding: 6px 0; }
  .trust-items { gap: 8px; justify-content: space-evenly; flex-wrap: nowrap; }
  .trust-items li { font-size: 10px; gap: 4px; letter-spacing: .02em; }
  .trust-items svg { width: 12px; height: 12px; }

  .store-top-discovery { padding: 16px 0; }
  .discovery-grid { gap: 12px; }
  .discovery-main-panel { min-width: 0; padding: 16px; }
  .discovery-title { font-size: 22px; margin: 0 0 12px; }
  .discovery-filters { gap: 10px; }
  .search-primary { height: 42px; padding: 4px 12px; }
  .search-primary svg { width: 18px; height: 18px; }
  .search-primary input { font-size: 15px; padding-left: 10px; }

  .filter-controls-row,
  .category-scroller { min-width: 0; max-width: 100%; }
  .filter-controls-row { gap: 12px; }
  .category-scroller { width: 100%; }
  .category-scroller label { padding: 7px 12px; font-size: 12px; }
  .secondary-filters select { padding: 7px 10px; font-size: 12px; }
  .reset-btn { padding: 8px; }

  .best-hire-rect { padding: 10px; min-height: 132px; }
  .best-hire-label {
    position: absolute; top: 14px; left: 14px; margin: 0;
    padding: 4px 8px; font-size: 10px;
  }
  .best-hire-link { flex-direction: row; align-items: center; gap: 12px; }
  .best-hire-img-wrap {
    flex: 0 0 112px; align-self: stretch; padding: 10px;
    margin: 0; max-height: 112px;
  }
  .best-hire-img-wrap img { max-height: 92px; }
  .best-hire-cat { font-size: 10px; }
  .best-hire-name { font-size: 17px; }
  .best-hire-price { font-size: 14px; }

  .featured-section { margin: 20px auto; }
  .section-header { margin-bottom: 10px; gap: 2px; }
  .section-header h2 { font-size: 19px; }
  .section-header p { font-size: 12px; }
  .featured-section .product-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 150px;
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
  }
  .featured-section .product-card { scroll-snap-align: start; }

  .catalogue-main { padding-bottom: 28px; }
  .catalogue-header { margin-bottom: 10px; padding-bottom: 8px; }
  .catalogue-meta { font-size: 12px; }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .card-image-wrap { aspect-ratio: 2; padding: 6px; }
  .status-badge, .promo-ribbon { padding: 4px 8px; font-size: 10px; top: 8px; }
  .status-badge { left: 8px; }
  .promo-ribbon { right: 8px; }
  .card-info { padding: 7px; }
  .card-category { display: none; }
  .card-title {
    font-size: 12px; line-height: 1.15; margin-bottom: 3px;
    word-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
  }
  .card-desc { display: none; }
  .card-bottom { flex-direction: column; align-items: stretch; gap: 2px; padding-top: 4px; }
  .price-amount { font-size: 14px; }
  .price-unit { font-size: 10px; }
  .product-card .add-button { display: none; }

  .support-section { padding: 28px 0; }
  .support-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .support-block h2 { font-size: 19px; margin: 0 0 10px; }
  .steps-list { gap: 10px; }
  .steps-list li { font-size: 12px; gap: 8px; }
  .steps-list li::before { width: 24px; height: 24px; font-size: 12px; }
  .steps-list strong { font-size: 13px; }
  .planner-tags { gap: 8px; margin-bottom: 12px; }
  .planner-tag { padding: 7px 10px; font-size: 12px; }
  .planner-note { font-size: 12px; }
  .events-grid, .articles-grid { gap: 10px; }
  .event-card, .article-card { padding: 12px; }
  .event-title, .article-title { font-size: 15px; margin: 0 0 6px; }
  .event-desc, .article-summary { font-size: 12px; }

  .site-footer { padding: 28px 0 0; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 24px; gap: 16px; }
  .footer-brand .logo-text { font-size: 21px; margin-bottom: 8px; }
  .footer-brand p { font-size: 12px; }
  .footer-links h4 { font-size: 12px; margin: 0 0 12px; }
  .footer-links a, .footer-links p { font-size: 12px; margin: 0 0 8px; }
  .site-footer > div:not(.container) { padding: 16px; gap: 8px; }

  .product-dialog {
    position: fixed;
    inset: 0;
    width: 100dvw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
    padding: 0;
    padding-top: env(safe-area-inset-top, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-left: env(safe-area-inset-left, 0);
  }
  .dialog-close {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0) + 12px);
    right: calc(env(safe-area-inset-right, 0) + 12px);
    width: 40px;
    height: 40px;
    z-index: 100;
  }
  .dialog-layout {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dialog-gallery {
    order: 2;
    padding: 24px 16px calc(32px + env(safe-area-inset-bottom, 0));
  }
  .dialog-details {
    order: 1;
    padding: 72px 16px 24px;
  }
  .dialog-header h2 { font-size: 30px; }
  .dialog-desc { margin-bottom: 20px; }
  .dialog-price strong { font-size: 32px; }
  .pricing-options { padding: 16px; }
  .rate-card { padding: 14px; gap: 12px; }
  .primary-cta { min-height: 48px; }
}
