/* Equipment Market Direct — EquipmentShare-inspired */

.theme-hem {
  background: var(--color-bg);
  color: var(--color-text);
}

html.is-scroll-locked,
html.is-scroll-locked body {
  overflow: hidden;
}

body.is-scroll-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

.wrap {
  width: min(1200px, calc(100% - 40px));
  margin-inline: auto;
}

.page {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--color-bg);
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--color-line);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding-block: 10px;
}

.brand-lockup {
  display: grid;
  gap: 2px;
  text-decoration: none;
  line-height: 1;
}

.brand-wordmark {
  font-family: var(--font-heading);
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-secondary);
}

.brand-sub {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link,
.phone-link {
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text-muted);
}

.nav-link.is-active,
.nav-link:hover,
.phone-link:hover {
  color: var(--color-accent);
}

.btn-compact {
  min-height: 42px;
  padding-inline: 18px;
  border-radius: var(--radius-control);
}

/* —— Hero (centered photo like ES) —— */
.hero-bleed {
  position: relative;
  min-height: min(82dvh, 760px);
  overflow: hidden;
  background: #14171b;
}

.hero-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--motion-page) var(--ease-smooth);
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-slide img,
.hero-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(20, 23, 27, 0.35) 0%, rgba(20, 23, 27, 0.55) 45%, rgba(20, 23, 27, 0.78) 100%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 14px;
  min-height: min(82dvh, 760px);
  padding: 88px 24px 72px;
  color: #fff;
}

.brand-hero {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.hero-kicker,
.eyebrow,
.drawer-kicker,
.lot-modal-desc-label,
.buy-ticket-label,
.buy-success-kicker {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.hero-kicker {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
}

.hero-copy h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  font-weight: 800;
  color: #fff;
  text-wrap: balance;
}

.hero-sub {
  margin: 0;
  max-width: 42ch;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.5;
}

.hero-cta-row {
  margin-top: 8px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: var(--radius-control);
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: background var(--motion-micro) var(--ease-spring), transform var(--motion-micro) var(--ease-spring);
}

.hero-cta:hover {
  background: var(--color-accent-deep);
  transform: translateY(-1px);
}

.hero-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.hero-dots {
  display: flex;
  gap: 6px;
}

.hero-dot {
  width: 28px;
  height: 4px;
  border: 0;
  padding: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
  background: var(--color-accent);
}

.hero-next {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.hero-next:hover {
  background: var(--color-accent);
}

/* —— Inventory —— */
.section {
  padding: 64px 0 72px;
}

.inventory-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 24px;
}

.inventory-title {
  margin: 6px 0 0;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.05;
}

.intro-count {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-control);
  padding: 10px 14px;
}

.yard-tools {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 12px;
  margin-bottom: 16px;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.field textarea {
  min-height: 100px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(232, 92, 42, 0.35);
  border-color: var(--color-accent);
}

.field-hint {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text-muted);
}

.field-error {
  color: var(--color-danger);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.field.is-invalid input,
.field.is-invalid textarea {
  border-color: var(--color-danger);
}

.field.is-valid input,
.field.is-valid textarea {
  border-color: var(--color-live);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.filter-chip {
  appearance: none;
  border: 1px solid var(--color-line);
  background: #fff;
  color: var(--color-text-muted);
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #fff;
  background: var(--color-secondary);
  border-color: var(--color-secondary);
}

.filter-chip.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* Card grid */
.lot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.lot-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-surface);
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  animation: card-in 420ms var(--ease-spring) both;
  transition: transform var(--motion-micro) var(--ease-spring), box-shadow var(--motion-micro) var(--ease-spring);
}

.lot-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.lot-gallery,
.lot-media {
  position: relative;
  min-height: 200px;
  background: #1a1d21;
}

.lot-media img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
}

.lot-badge,
.lot-sale {
  position: absolute;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: var(--radius-tight);
}

.lot-badge {
  left: 12px;
  bottom: 12px;
  background: rgba(26, 29, 33, 0.88);
  color: #fff;
}

.lot-sale {
  top: 12px;
  right: 12px;
  background: var(--color-accent);
  color: #fff;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  translate: 0 -50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-secondary);
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.gallery-count {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: var(--radius-tight);
  background: rgba(26, 29, 33, 0.8);
  color: #fff;
}

.lot-body {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
  padding: 18px;
  height: 100%;
  min-height: 0;
}

.lot-body h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  min-height: 2.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lot-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.lot-stat {
  background: var(--color-surface-2);
  border-radius: var(--radius-tight);
  padding: 8px 10px;
}

.lot-stat dt {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.lot-stat dd {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.lot-buy {
  display: flex;
  align-self: end;
  margin-top: auto;
}

.btn-buy {
  width: 100%;
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  font-weight: 700;
  border-radius: var(--radius-control);
  min-height: 46px;
}

.btn-buy:hover {
  background: var(--color-accent-deep);
}

.yard-view { display: none; }
.yard-board[data-state="loading"] .yard-view-loading,
.yard-board[data-state="empty"] .yard-view-empty,
.yard-board[data-state="error"] .yard-view-error,
.yard-board[data-state="success"] .yard-view-success {
  display: block;
}

.state-panel {
  border: 1px solid var(--color-line);
  background: #fff;
  border-radius: var(--radius-surface);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.state-panel h3 {
  margin: 0 0 8px;
  font-size: 28px;
}

.state-panel p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.skeleton {
  background: linear-gradient(90deg, #e8eaee, #f5f6f8, #e8eaee);
  background-size: 200% 100%;
  animation: shimmer 1.1s linear infinite;
  border-radius: var(--radius-tight);
}

.skeleton-card {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-surface);
  padding: 12px;
  display: grid;
  gap: 10px;
  background: #fff;
}

.skeleton-photo { height: 160px; }
.skeleton-line { height: 12px; }
.skeleton-line.short { width: 40%; }

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.lot-photo-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  background: rgba(26, 29, 33, 0.35);
  color: #fff;
  pointer-events: none;
}

.lot-photo-loading[hidden] { display: none !important; }

.lot-photo-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: lot-spin 0.7s linear infinite;
}

.lot-photo-loading-text {
  font-size: 12px;
  font-weight: 600;
}

@keyframes lot-spin { to { transform: rotate(360deg); } }

/* —— Contact (dark band) —— */
.contact {
  background: var(--color-secondary);
  color: #fff;
}

.contact .eyebrow {
  color: var(--color-accent);
}

.contact-band {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: start;
}

.contact-copy h2 {
  margin: 8px 0 12px;
  font-size: clamp(32px, 4vw, 44px);
  color: #fff;
}

.contact-copy p {
  color: rgba(255, 255, 255, 0.72);
  max-width: 42ch;
}

.address-list {
  display: grid;
  gap: 8px;
  font-style: normal;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-surface);
  padding: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.address-list a {
  color: var(--color-accent);
  text-decoration: none;
}

.site-footer {
  background: #121417;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  color: rgba(255, 255, 255, 0.55);
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
}

.footer-bar a {
  color: #fff;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* —— Side drawers —— */
.drawer {
  width: var(--drawer-lot-w);
  max-width: 100vw;
  height: 100%;
  max-height: 100dvh;
  margin: 0;
  margin-left: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--color-text);
  translate: 100% 0;
  transition: translate var(--motion-panel) var(--ease-spring);
}

.buy-drawer {
  width: var(--drawer-buy-w);
}

.drawer[open] { display: block; }
.drawer.is-open { translate: 0 0; }

.drawer::backdrop {
  background: rgba(20, 23, 27, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--motion-panel) var(--ease-smooth);
}

.drawer.is-open::backdrop { opacity: 1; }

.drawer-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  background: #fff;
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.2);
}

.buy-drawer-panel {
  grid-template-rows: auto 1fr;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--color-line);
}

.drawer-title {
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.1;
}

.drawer-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-control);
  background: var(--color-bg);
  color: var(--color-secondary);
  flex: 0 0 auto;
}

.drawer-close:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.drawer-scroll {
  overflow: auto;
  padding: 18px 20px 24px;
}

.drawer-foot {
  padding: 14px 20px 20px;
  border-top: 1px solid var(--color-line);
  background: #fff;
}

.drawer-foot .btn-buy { width: 100%; }

.lot-modal-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-surface);
  background: #1a1d21;
  aspect-ratio: 16 / 10;
}

.lot-modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.lot-modal-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 68px;
  gap: 8px;
  overflow-x: auto;
  margin-top: 12px;
}

.lot-modal-thumb {
  width: 68px;
  height: 52px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-tight);
  background: var(--color-surface-2);
  overflow: hidden;
  opacity: 0.75;
}

.lot-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lot-modal-thumb.is-active,
.lot-modal-thumb:hover {
  opacity: 1;
  border-color: var(--color-accent);
}

.lot-modal-side {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.buy-modal-price {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-secondary);
}

.lot-modal-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.lot-meta {
  background: var(--color-surface-2);
  border-radius: var(--radius-inset);
  padding: 12px;
}

.lot-meta dt {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.lot-meta dd {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
}

.lot-modal-desc {
  margin-top: 8px;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.55;
}

.buy-ticket {
  display: grid;
  gap: 6px;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-surface);
  background: var(--color-surface-2);
  border-left: 4px solid var(--color-accent);
}

.buy-ticket strong {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.buy-modal-form {
  display: grid;
  gap: 12px;
}

.buy-form-note {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted);
}

.form-error {
  border: 1px solid var(--color-danger);
  background: rgba(196, 60, 44, 0.08);
  color: var(--color-danger);
  padding: 10px 12px;
  border-radius: var(--radius-tight);
  font-size: 14px;
  font-weight: 600;
}

.buy-submit {
  width: 100%;
  margin-top: 4px;
}

.buy-modal-success h3 {
  margin: 6px 0 10px;
  font-size: 28px;
}

/* Lightbox */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 0;
  background: rgba(10, 12, 14, 0.96);
  color: #fff;
}

.lightbox::backdrop { background: #000; }

.lightbox-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.lightbox-stage {
  width: min(1200px, calc(100% - 48px));
  height: min(80dvh, 900px);
  position: relative;
}

.lightbox-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 5;
  border: 0;
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.lightbox-close { top: 16px; right: 16px; width: 44px; height: 44px; }
.lightbox-prev { left: 16px; top: 50%; translate: 0 -50%; width: 44px; height: 44px; }
.lightbox-next { right: 16px; top: 50%; translate: 0 -50%; width: 44px; height: 44px; }

.lightbox-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.lightbox.is-loading .lightbox-stage img { opacity: 0.4; }
.lot-drawer.is-behind-lightbox { filter: brightness(0.55); }

/* About */
.about-hero {
  padding: 56px 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--color-line);
}

.about-hero h1 {
  margin: 8px 0 14px;
  font-size: clamp(40px, 7vw, 64px);
  line-height: 1.05;
}

.about-lead {
  max-width: 48ch;
  font-size: 18px;
  color: var(--color-text-muted);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  padding: 36px 0 64px;
}

.about-body p {
  color: var(--color-text-muted);
  margin: 0 0 14px;
}

.about-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.about-points li {
  border: 1px solid var(--color-line);
  background: #fff;
  border-radius: var(--radius-surface);
  padding: 16px;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

@media (max-width: 980px) {
  .lot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .yard-tools { grid-template-columns: 1fr; }
  .lot-grid { grid-template-columns: 1fr; }
  .contact-band,
  .about-grid { grid-template-columns: 1fr; }
  .header-actions .phone-link { display: none; }
  .drawer { width: 100vw; }
  .hero-copy { padding-top: 96px; }
}
