/* ===== Home ===== */
.home-hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  animation: heroZoom 18s ease-in-out infinite alternate;
}

.home-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(8, 40, 36, 0.88) 8%,
    rgba(8, 40, 36, 0.55) 48%,
    rgba(8, 40, 36, 0.25) 100%
  );
}

@keyframes heroZoom {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.08);
  }
}

.home-hero-content {
  position: relative;
  z-index: 1;
  padding: 72px 0 80px;
  max-width: 640px;
}

.home-hero-brand {
  font-family: var(--display);
  font-size: clamp(42px, 6vw, 64px);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: 0.04em;
  animation: fadeUp 0.8s ease both;
}

.home-hero-content h2 {
  margin: 0 0 14px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  animation: fadeUp 0.8s ease 0.1s both;
}

.home-hero-content p {
  margin: 0 0 28px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.88);
  max-width: 480px;
  animation: fadeUp 0.8s ease 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeUp 0.8s ease 0.3s both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
}

.hero-dots button.active {
  background: #fff;
  width: 28px;
  border-radius: 999px;
}

.quick-cats {
  margin-top: -36px;
  position: relative;
  z-index: 3;
}

.quick-cats-inner {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}

.quick-cat {
  text-align: center;
  padding: 12px 6px;
  border-radius: 12px;
  transition: 0.2s ease;
}

.quick-cat:hover {
  background: var(--brand-soft);
  transform: translateY(-2px);
}

.quick-cat .icon {
  font-size: 24px;
  display: block;
  margin-bottom: 6px;
}

.quick-cat span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* ===== Detail layouts ===== */
.detail-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}

.gallery-main {
  height: 420px;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.gallery-thumbs button {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 2px solid transparent;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  padding: 0;
}

.gallery-thumbs button.active {
  border-color: var(--brand);
}

.detail-side h1 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.3;
}

.detail-price {
  color: var(--accent);
  font-size: 32px;
  font-weight: 800;
  margin: 12px 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
}

.detail-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-block h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.contact-list {
  display: grid;
  gap: 8px;
}

.contact-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fafb;
  border-radius: 10px;
}

.contact-list .label {
  color: var(--muted);
}

.merchant-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--brand-soft);
  margin: 16px 0;
}

.merchant-bar img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.merchant-bar strong {
  display: block;
}

.merchant-bar span {
  color: var(--muted);
  font-size: 13px;
}

/* ===== Category filter ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-bar a,
.filter-bar button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.filter-bar a.active,
.filter-bar button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ===== Auth pages ===== */
.auth-wrap {
  min-height: calc(100vh - 220px);
  display: grid;
  place-items: center;
  padding: 40px 0;
}

.auth-card {
  width: min(440px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 107, 92, 0.08);
  padding: 36px 32px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 32px;
  font-weight: 400;
  text-align: center;
}

.auth-card .sub {
  text-align: center;
  color: var(--muted);
  margin: 0 0 24px;
}

.auth-extra {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.auth-extra a {
  color: var(--brand);
  font-weight: 600;
}

/* ===== Publish / Settle ===== */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
  align-items: start;
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-list li {
  padding: 14px 16px;
  background: #f8fafb;
  border-radius: 12px;
  border-left: 3px solid var(--brand);
}

.benefit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.benefit-item {
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f4faf8);
  border: 1px solid rgba(15, 107, 92, 0.1);
}

.benefit-item h4 {
  margin: 0 0 6px;
  color: var(--brand-dark);
}

.benefit-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 10px;
}

.steps li {
  counter-increment: step;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
}

.steps li::before {
  content: counter(step);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.agreement-box {
  max-height: 260px;
  overflow: auto;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  color: #3d4b5a;
  white-space: pre-wrap;
  line-height: 1.7;
  margin-bottom: 12px;
}

.login-gate {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: var(--brand-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.login-gate p {
  margin: 0;
  color: var(--brand-dark);
  font-size: 14px;
}

/* ===== Merchant page ===== */
.merchant-hero {
  height: 220px;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.merchant-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
}

.merchant-hero-info {
  position: absolute;
  z-index: 1;
  left: 24px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}

.merchant-hero-info img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #fff;
  object-fit: cover;
}

.merchant-hero-info h1 {
  margin: 0;
  font-size: 28px;
}

.merchant-hero-info p {
  margin: 4px 0 0;
  opacity: 0.9;
  font-size: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 40, 36, 0.92);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 100;
  font-size: 14px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 900px) {
  .quick-cats-inner {
    grid-template-columns: repeat(4, 1fr);
  }
  .detail-layout,
  .split-layout {
    grid-template-columns: 1fr;
  }
  .gallery-main {
    height: 280px;
  }
  .benefit-grid {
    grid-template-columns: 1fr;
  }
}
