/* src/modules/clients/web/public/css/marketplace.css */

:root {
  --bg-color: #000000;
  --card-bg: #111111;
  --accent-color: #ffffff;
  --text-primary: #ffffff;
  --text-secondary: #9a9a9a;
  --border-color: #2a2a2a;
}

html {
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a var(--bg-color);
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: #000;
  background-image:
    linear-gradient(#0f0f0f 1px, transparent 1px),
    linear-gradient(90deg, #0f0f0f 1px, transparent 1px);
  background-size: 48px 48px;
  background-repeat: repeat;
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

::-webkit-scrollbar-corner {
  background: var(--bg-color);
}

.main-nav {
  position: fixed;
  top: var(--announce-h, 0px);
  left: 0;
  right: 0;
  height: 80px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  text-decoration: none;
}

.logo-text {
  font-family: "Unbounded", sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 42px;
}

.nav-actions:not([data-ready]) {
  visibility: hidden;
}

.nav-user {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 4px;
}

.nav-user:hover {
  text-decoration: underline;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: all 0.3s ease;
  color: #ffffff;
  border: 1px solid transparent;
}

.nav-button:hover {
  color: #ffffff;
}

.nav-button.active {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
}

.nav-button.active:hover {
  background: #e8e8e8;
  transform: translateY(-1px);
}

.nav-button.ghost {
  background: transparent;
  color: #ffffff;
  border: 1px solid #ffffff;
}

.nav-button.ghost:hover {
  background: #ffffff;
  color: #000000;
}

.marketplace-stage {
  min-height: calc(100svh - var(--announce-h, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 40px 96px;
  box-sizing: border-box;
  position: relative;
}

.marketplace-stage.is-search {
  min-height: 0;
  justify-content: flex-start;
  padding: 140px 40px 24px;
}

.marketplace-stage > .pwa-pill {
  position: absolute;
  top: calc(80px + 36px);
  left: 0;
  right: 0;
  width: max-content;
  max-width: calc(100% - 32px);
  margin-inline: auto;
  transform: none;
  z-index: 2;
  padding: 9px 16px 9px 13px;
  font-size: 14px;
}

.marketplace-hero {
  text-align: center;
  margin-bottom: 28px;
  max-width: 820px;
}

.hero-title {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 900;
  margin: 0 0 20px;
  letter-spacing: -2px;
}

.hero-description {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

.search-container {
  width: min(700px, 100%);
  margin: 0 auto;
  position: relative;
}

.search-container form {
  position: relative;
}

.search-input {
  width: 100%;
  height: 60px;
  background-color: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 999px;
  padding: 0 68px 0 28px;
  color: #fff;
  font-size: 17px;
  font-family: "Montserrat", sans-serif;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.search-button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  color: #000000;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.search-button svg {
  display: block;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.scroll-hint.is-gone {
  opacity: 0;
  pointer-events: none;
}

.scroll-hint__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scroll-hint__mouse {
  width: 22px;
  height: 34px;
  border: 1.5px solid #666;
  border-radius: 12px;
  position: relative;
}

.scroll-hint__wheel {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #fff;
  animation: scroll-wheel 1.6s ease-in-out infinite;
}

.scroll-hint__chevron {
  color: #fff;
  animation: scroll-chevron 1.6s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0%,
  20% {
    transform: translateY(0);
    opacity: 1;
  }
  80%,
  100% {
    transform: translateY(8px);
    opacity: 0;
  }
}

@keyframes scroll-chevron {
  0%,
  20% {
    transform: translateY(0);
    opacity: 0.45;
  }
  60% {
    transform: translateY(6px);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
}

.marketplace-catalog {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 40px 80px;
  scroll-margin-top: 96px;
}
.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

.marketplace-card {
  background-color: var(--card-bg);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}

.marketplace-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--accent-color);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.card-image-wrapper {
  width: 100%;
  height: 200px;
  background-color: #111;
  overflow: hidden;
  position: relative;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-image-wrapper.is-placeholder {
  background: #1c1c1c;
}

.card-image-wrapper.is-placeholder img {
  object-fit: cover;
  object-position: center;
  opacity: 1;
}

.marketplace-card:hover .card-image-wrapper img {
  transform: scale(1.1);
}

.card-content {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-business-name {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-color);
  margin-bottom: 4px;
}

.card-product-name {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
  font-family: "Unbounded", sans-serif;
}

.card-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.card-price {
  font-size: 18px;
  font-weight: 700;
}

.visit-button {
  background-color: #ffffff;
  color: #000000;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid #ffffff;
  transition: all 0.3s ease;
}

.visit-button:hover {
  background-color: #e8e8e8;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .main-nav .nav-docs {
    display: none;
  }
}

@media (max-width: 768px) {
  .main-nav {
    height: 64px;
  }

  .marketplace-stage > .pwa-pill {
    top: calc(64px + 12px);
  }

  .nav-container {
    padding: 0 16px;
    gap: 8px;
    min-width: 0;
  }

  .logo-text {
    font-size: 18px;
    letter-spacing: -0.4px;
  }

  .marketplace-stage {
    padding: 96px 20px 88px;
  }
  .marketplace-stage.is-search {
    padding: 112px 20px 16px;
  }
  .hero-title {
    font-size: 32px;
    letter-spacing: -1px;
  }
  .hero-description {
    font-size: 15px;
  }
  .marketplace-catalog {
    padding: 24px 20px 72px;
  }
  .marketplace-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .main-nav .lang-switch {
    margin-right: 0;
  }
}
