:root {
  --page: #f6f7fb;
  --surface: #ffffff;
  --surface-muted: #fff6dc;
  --border: #d7dcea;
  --text: #191f2c;
  --muted: #59657d;
  --blue: #2a64ff;
  --blue-deep: #1738a7;
  --yellow: #ffcc1a;
  --green: #0a9f68;
  --shadow: 0 18px 45px rgba(26, 34, 56, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(255, 204, 26, 0.2), transparent 22rem),
    linear-gradient(180deg, #fdfefe 0%, var(--page) 30%, #eef1f8 100%);
  color: var(--text);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.container {
  width: 95%;
  margin: 0 auto;
}

.hidden {
  display: none;
}

[hidden] {
  display: none !important;
}

.utility-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding-bottom: 1rem;
}

.account-panel {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.auth-status {
  font-weight: 700;
  color: var(--muted);
}

.auth-shell {
  padding-top: 1rem;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
}

.modal-shell.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(34rem, calc(100% - 1rem));
  padding: 1.5rem;
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(215, 220, 234, 0.85);
  box-shadow: var(--shadow);
}

.listings-modal-card {
  width: min(64rem, calc(100% - 1.5rem));
}

.modal-top,
.auth-switches {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.auth-switches {
  margin: 1rem 0;
  justify-content: flex-start;
}

.auth-card,
.bid-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(215, 220, 234, 0.85);
  border-radius: 1.6rem;
  box-shadow: var(--shadow);
}

.auth-card {
  padding: 1.5rem;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.auth-form,
.bid-form {
  display: grid;
  gap: 0.75rem;
}

.create-listing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.auth-form input,
.bid-form input,
.create-listing-grid input,
.create-listing-grid select,
.create-listing-grid textarea {
  min-height: 3rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  padding: 0 1rem;
}

.create-listing-grid textarea {
  min-height: 8rem;
  padding-top: 0.9rem;
  grid-column: 1 / -1;
}

.create-listing-grid button {
  max-width: 16rem;
}

.image-tile-drop {
  min-height: 10rem;
  border: 2px dashed var(--border);
  border-radius: 1.2rem;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  background: rgba(246, 247, 251, 0.9);
}

.image-tile-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.75rem;
}

.image-preview-strip,
.listing-gallery {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.image-preview-strip img,
.gallery-thumb img {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
}

.gallery-thumb {
  border: 0;
  background: transparent;
  padding: 0;
}

.gallery-thumb.active img {
  outline: 3px solid rgba(42, 100, 255, 0.35);
}

.image-manager {
  margin-top: 1rem;
}

.image-manager-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.form-message {
  min-height: 1.5rem;
  color: var(--green);
  font-weight: 700;
}

.error-text {
  color: #b42318;
}

.bid-note {
  margin-top: 0.4rem;
}

.bids-list {
  display: grid;
  gap: 1rem;
}

.bid-card {
  padding: 1rem 1.2rem;
}

.listings-editor-list {
  max-height: min(70vh, 46rem);
  overflow: auto;
  padding-right: 0.25rem;
}

.listing-editor-card {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(215, 220, 234, 0.85);
  border-radius: 1.4rem;
  box-shadow: var(--shadow);
}

.listing-editor-thumb {
  width: 6.5rem;
  height: 6.5rem;
  object-fit: cover;
  border-radius: 1rem;
  border: 1px solid var(--border);
}

.listing-editor-body h3,
.listing-editor-body p {
  margin: 0;
}

.listing-editor-body span {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
}

.listing-editor-topline {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.listing-editor-actions {
  margin-bottom: 0;
  justify-content: flex-end;
}

.listing-state {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.listing-state.is-active {
  background: rgba(10, 159, 104, 0.12);
  color: var(--green);
}

.listing-state.is-ended {
  background: rgba(25, 31, 44, 0.08);
  color: var(--muted);
}

.bid-card h3,
.bid-card p {
  margin: 0;
}

.bid-card span {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
}

.promo-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #101828;
  color: #fff;
  font-size: 0.95rem;
}

.promo-bar a {
  color: var(--yellow);
  font-weight: 700;
}

.main-nav {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.35rem 0 1rem;
}

.brand-mark {
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-giant {
  color: var(--blue);
}

.brand-shop {
  color: #eb6d00;
}

.search-bar {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 0.75rem;
}

.search-bar input,
.search-bar select,
.search-bar button {
  border-radius: 999px;
  border: 1px solid var(--border);
  min-height: 3.2rem;
}

.search-bar input,
.search-bar select {
  padding: 0 1.1rem;
  background: rgba(255, 255, 255, 0.95);
}

.search-bar button,
.button-primary,
.button-secondary {
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.search-bar button,
.button-primary {
  padding: 0 1.3rem;
  border: 0;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 20px rgba(42, 100, 255, 0.25);
}

.search-bar button:hover,
.button-primary:hover {
  transform: translateY(-2px);
  background: var(--blue-deep);
}

.category-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.25rem 0 1.25rem;
  border-bottom: 1px solid rgba(215, 220, 234, 0.85);
}

.category-nav a {
  color: var(--muted);
  font-weight: 600;
}

.hero-band {
  padding: 2rem 0 1rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.feature-callout,
.detail-image-card,
.detail-summary,
.highlight-card,
.product-card,
.deal-card,
.section-header {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(215, 220, 234, 0.85);
  border-radius: 1.6rem;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(1.75rem, 3vw, 3rem);
  background:
    linear-gradient(120deg, rgba(42, 100, 255, 0.08), rgba(255, 204, 26, 0.16)),
    rgba(255, 255, 255, 0.96);
}

.eyebrow {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--green);
}

.hero-copy h1,
.section-header h1,
.detail-summary h1 {
  margin: 0;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 6vw, 4.9rem);
  max-width: 12ch;
}

.hero-text,
.feature-callout p,
.section-note,
.detail-copy,
.subtitle,
.section-header p {
  color: var(--muted);
  font-size: 1.04rem;
}

.hero-actions,
.detail-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border-radius: 999px;
  padding: 0 1.3rem;
  font-weight: 700;
}

.button-secondary {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.button-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(25, 31, 44, 0.08);
}

.hero-panel {
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
  background:
    linear-gradient(180deg, rgba(255, 204, 26, 0.2), rgba(42, 100, 255, 0.1)),
    rgba(255, 255, 255, 0.96);
}

.hero-stat {
  padding: 1.2rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(215, 220, 234, 0.85);
}

.hero-stat strong {
  display: block;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  font-size: 2rem;
}

.hero-stat span {
  color: var(--muted);
}

.category-strip {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 1.25rem 0 0.4rem;
}

.category-pill {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-weight: 700;
}

.feature-layout,
.listing-section,
.deals-section {
  padding: 1.5rem 0 0.25rem;
}

.feature-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.2rem;
}

.feature-callout,
.section-header {
  padding: 1.5rem;
}

.feature-callout h2,
.section-heading h2 {
  margin: 0;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -0.03em;
}

.highlight-grid,
.product-grid {
  display: grid;
  gap: 1rem;
}

.highlight-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.highlight-card,
.product-card {
  overflow: hidden;
  position: relative;
}

.highlight-card img,
.product-card img,
.deal-card img,
.detail-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.highlight-card img {
  aspect-ratio: 1.2 / 1;
}

.highlight-card-body,
.product-body {
  padding: 1rem;
}

.badge-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  background: rgba(42, 100, 255, 0.09);
  color: var(--blue-deep);
  font-size: 0.82rem;
  font-weight: 700;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.auth-card .section-heading {
  align-items: center;
}

.product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  display: flex;
  flex-direction: column;
}

.image-wrap img {
  aspect-ratio: 1 / 1;
}

.product-body h3,
.highlight-card-body h3,
.deal-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
}

.product-body p,
.highlight-card-body p,
.deal-card p {
  margin: 0;
  color: var(--muted);
}

.product-body strong,
.highlight-card-body strong,
.deal-card strong,
.price {
  display: block;
  margin-top: 0.9rem;
  font-size: 1.45rem;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
}

.shipping {
  display: block;
  margin-top: 0.4rem;
  color: var(--green);
  font-weight: 700;
}

.deal-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.deal-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 1rem;
  padding: 1rem;
  align-items: center;
  position: relative;
}

.deal-card img {
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  border: 1px dashed var(--border);
  border-radius: 1.2rem;
  text-align: center;
  color: var(--muted);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.95fr;
  gap: 1.3rem;
  padding: 1.8rem 0 0.4rem;
}

.detail-image-card {
  overflow: hidden;
  position: relative;
}

.detail-image-card img {
  aspect-ratio: 1 / 1;
}


.detail-summary {
  padding: 1.6rem;
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.85rem;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(246, 247, 251, 0.9);
}

.spec-list span {
  color: var(--muted);
}

.site-footer {
  margin-top: 2rem;
  padding: 2rem 0 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1.6rem;
  background: #111827;
  color: #fff;
}

.footer-grid h3,
.footer-grid h4 {
  margin-top: 0;
}

.footer-grid a {
  display: block;
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 980px) {
  .main-nav,
  .hero-grid,
  .feature-layout,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .utility-row,
  .account-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-bar,
  .deal-list,
  .product-grid,
  .highlight-grid,
  .auth-grid,
  .create-listing-grid {
    grid-template-columns: 1fr 1fr;
  }

  .listing-editor-card {
    grid-template-columns: 6.5rem 1fr;
  }

  .listing-editor-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .promo-bar,
  .section-heading,
  .deal-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-top,
  .auth-switches {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-bar,
  .deal-list,
  .product-grid,
  .highlight-grid,
  .deal-card,
  .auth-grid,
  .create-listing-grid {
    grid-template-columns: 1fr;
  }

  .listing-editor-card {
    grid-template-columns: 1fr;
  }

  .listing-editor-thumb {
    width: 100%;
    height: 12rem;
  }

  .listing-editor-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .container {
    width: 95%;
  }

  .hero-copy h1 {
    max-width: none;
  }
}
