/* ---------- Brand tokens ---------- */
:root {
  --brand-red: #d61f26;
  --brand-red-dark: #b8161c;
  --brand-red-light: #ffe9ea;
  --brand-navy: #14223d;
  --brand-navy-2: #1f3252;
  --ink: #14223d;
  --muted: #5b6675;
  --bg: #fbf7f5;
  --surface: #ffffff;
  --line: #ecddde;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 .4em;
  line-height: 1.25;
  color: var(--brand-navy);
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.container.narrow {
  max-width: 860px;
}

.section {
  padding: 64px 0;
}

.section-alt {
  background: #fff;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.section-head.center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-head .subtitle {
  color: var(--muted);
  margin: 4px 0 0;
}

.link-more {
  color: var(--brand-red);
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-red) 0%, #ee2f37 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(214, 31, 38, .28);
}

.btn-primary:hover {
  box-shadow: 0 10px 24px rgba(214, 31, 38, .36);
}

.btn-ghost {
  background: #fff;
  color: var(--brand-red);
  border-color: #f3cfd1;
}

.btn-ghost:hover {
  background: var(--brand-red-light);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 1rem;
  border-radius: 12px;
}

.btn-sm {
  padding: 7px 14px;
  font-size: .85rem;
  border-radius: 8px;
}

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--brand-navy);
}

.logo-img {
  height: 56px;
  width: auto;
  display: block;
}

.logo-text-fallback {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -.01em;
}

.logo-text-fallback .red {
  color: var(--brand-red);
}

.logo-text-fallback .navy {
  color: var(--brand-navy);
}

.main-nav {
  display: flex;
  gap: 6px;
}

.main-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: #4a5762;
  font-weight: 500;
}

.main-nav a:hover {
  background: var(--brand-red-light);
  color: var(--brand-red);
}

.main-nav a.active {
  color: var(--brand-red);
  background: var(--brand-red-light);
}

.header-cta {
  display: inline-flex;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 1.2rem;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 360px at 90% -10%, #ffd9db 0%, transparent 60%),
    radial-gradient(900px 320px at -10% 110%, #e2e8f5 0%, transparent 55%),
    var(--bg);
  padding: 64px 0 72px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  background: var(--brand-red-light);
  color: var(--brand-red-dark);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hero h1 {
  margin-top: 16px;
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
}

.hero .accent {
  color: var(--brand-red);
}

.hero .lead {
  font-size: 1.08rem;
  color: #475561;
  max-width: 540px;
}

.hero-search {
  display: flex;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(20, 34, 61, .08);
  max-width: 560px;
  margin: 22px 0 28px;
}

.hero-search input {
  flex: 1;
  border: 0;
  outline: none;
  padding: 12px 14px;
  font-size: 1rem;
  background: transparent;
}

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 14px;
}

.hero-stats>div {
  display: flex;
  flex-direction: column;
}

.hero-stats strong {
  font-size: 1.5rem;
  color: var(--brand-navy);
  font-weight: 800;
}

.hero-stats span {
  color: var(--muted);
  font-size: .9rem;
}

.hero-art {
  position: relative;
  height: 420px;
  display: grid;
  place-items: center;
}

.hero-logo-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.hero-logo-wrap::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff 0%, #fff 60%, transparent 75%);
  box-shadow: 0 30px 60px rgba(214, 31, 38, .15);
  z-index: 0;
}

.hero-logo-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(20, 34, 61, .18));
}

.hero-card {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 12px 28px rgba(20, 34, 61, .10);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.hero-card span {
  font-size: .9rem;
  color: var(--brand-navy);
  font-weight: 700;
}

.hero-card-1 {
  top: 4%;
  left: -4%;
  transform: rotate(-6deg);
}

.hero-card-2 {
  top: 12%;
  right: -4%;
  transform: rotate(6deg);
}

.hero-card-3 {
  bottom: 12%;
  left: -6%;
  transform: rotate(4deg);
}

.hero-card-4 {
  bottom: 2%;
  right: -2%;
  transform: rotate(-4deg);
}

/* ---------- Categories grid ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.cat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 16px;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(20, 34, 61, .08);
  border-color: #f3cfd1;
}

.cat-icon {
  font-size: 2.2rem;
}

.cat-name {
  font-weight: 700;
  color: var(--brand-navy);
}

.cat-count {
  color: var(--muted);
  font-size: .85rem;
}

/* ---------- Product grid & cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(20, 34, 61, .12);
}

.product-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f3eceb;
  overflow: hidden;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.product-card:hover .product-img img {
  transform: scale(1.04);
}

.product-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, .94);
  color: var(--brand-navy);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}

.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--brand-red);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.product-body {
  padding: 14px 16px 16px;
}

.product-title {
  font-size: .98rem;
  font-weight: 600;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2;
  min-height: 2.8em;
  color: var(--brand-navy);
}

.product-price {
  color: var(--brand-red);
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.product-meta {
  color: var(--muted);
  font-size: .82rem;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---------- How it works ---------- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 40px;
}

.how-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  text-align: left;
}

.how-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-red-light);
  color: var(--brand-red);
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.how-card h3 {
  margin-bottom: 6px;
}

.how-card p {
  color: var(--muted);
  margin: 0;
}

/* ---------- CTA band ---------- */
.cta-band {
  margin-top: 16px;
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-2) 60%, var(--brand-red) 130%);
  color: #fff;
  border-radius: 18px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 16px 36px rgba(20, 34, 61, .25);
}

.cta-band h3 {
  color: #fff;
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.cta-band p {
  color: rgba(255, 255, 255, .88);
  margin: 0;
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--brand-red);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

.cta-band .btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .5);
}

.cta-band .btn-ghost:hover {
  background: rgba(255, 255, 255, .1);
}

.cta-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Page head ---------- */
.page-head {
  background: linear-gradient(180deg, var(--brand-red-light) 0%, var(--bg) 100%);
  padding: 48px 0 24px;
  border-bottom: 1px solid var(--line);
}

.page-head .subtitle {
  color: var(--muted);
  margin: 4px 0 18px;
}

.page-search {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 10px;
  background: #fff;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(20, 34, 61, .08);
  margin-top: 18px;
}

.page-search input,
.page-search select {
  border: 0;
  background: #faf3f3;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: .95rem;
  outline: none;
  color: var(--ink);
}

.page-search input:focus,
.page-search select:focus {
  background: var(--brand-red-light);
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: .95rem;
}

.empty-state {
  text-align: center;
  padding: 60px 16px;
  background: #fff;
  border: 1px dashed #e1c8ca;
  border-radius: 18px;
}

.empty-emoji {
  font-size: 3rem;
  margin-bottom: 8px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-red);
  font-weight: 600;
  margin-bottom: 18px;
}

.back-link:hover {
  text-decoration: underline;
}

/* ---------- Detail page ---------- */
.product-detail {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: start;
}

.detail-media {
  position: relative;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}

.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-badge {
  top: 16px;
  right: 16px;
}

.detail-info {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-cat {
  color: var(--brand-red);
  font-weight: 600;
  font-size: .9rem;
}

.detail-info h1 {
  margin: 0;
}

.detail-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-red);
}

.detail-meta {
  color: var(--muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.seller-card {
  margin-top: 6px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.seller-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-navy-2));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.2rem;
}

.seller-name {
  font-weight: 700;
  color: var(--brand-navy);
}

.seller-label {
  color: var(--muted);
  font-size: .85rem;
}

.call-btn {
  grid-column: 1 / -1;
}

.safety-note {
  background: #fff5f5;
  border: 1px solid #f3cfd1;
  color: #6a1d22;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: .9rem;
}

.detail-desc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
}

.detail-desc h2 {
  margin-top: 0;
}

.similar-block h2 {
  margin-bottom: 18px;
}

/* ---------- Forms (sell page) ---------- */
.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 12px 30px rgba(20, 34, 61, .06);
  margin: 0 auto;
}

.form-section+.form-section {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid #f4e6e7;
}

.form-section h3 {
  color: var(--brand-red);
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .92rem;
  color: #3a4753;
  font-weight: 500;
}

.form-row em {
  color: #d9534f;
  font-style: normal;
  margin-left: 2px;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  border: 1px solid #e3d3d4;
  background: #fdfafa;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: .98rem;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--brand-red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(214, 31, 38, .14);
}

.form-row textarea {
  resize: vertical;
  min-height: 110px;
}

.form-note {
  margin-top: 24px;
  background: #faf3f3;
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: .88rem;
}

.form-actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.alert {
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 22px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.alert-success {
  background: var(--brand-red-light);
  border: 1px solid #f3cfd1;
  color: var(--brand-red-dark);
}

.alert-success strong {
  font-size: 1.05rem;
}

.alert-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ---------- About page ---------- */
.about-content {
  margin: 0 auto;
}

.about-content h2 {
  margin-top: 36px;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0 36px;
}

.value-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}

.value-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.value-card h3 {
  margin: 0 0 6px;
}

.value-card p {
  color: var(--muted);
  margin: 0;
}

.tips {
  padding-left: 20px;
  color: #3a4753;
}

.tips li {
  margin: 6px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-navy);
  color: #c8d2da;
  padding: 56px 0 24px;
  margin-top: 64px;
}

.site-footer .logo,
.site-footer .logo-text-fallback {
  color: #fff;
}

.site-footer .logo-img {
  background: #fff;
  border-radius: 50%;
  padding: 6px;
  height: 60px;
  width: 60px;
  object-fit: contain;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-inner h4 {
  color: #fff;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}

.footer-inner a {
  display: block;
  color: #9eb0bc;
  padding: 4px 0;
}

.footer-inner a:hover {
  color: #fff;
}

.site-footer .muted {
  color: #9eb0bc;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #2a3a55;
  color: #8a98a4;
  font-size: .88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom .copyright-text {
  margin: 0;
}

.powered-by {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid #2a3a55;
  padding: 8px 14px;
  border-radius: 999px;
}

.powered-by a {
  color: #c8d2da;
  display: inline;
  padding: 0;
}

.powered-by a:hover {
  color: #fff;
  text-decoration: underline;
}

.powered-by .brand {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand-red), #ff5b62);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.powered-by .dot {
  color: #4a5b75;
}

@media (max-width: 720px) {
  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-art {
    height: 280px;
    margin-top: 12px;
  }

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

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

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e6ecea;
    flex-direction: column;
    gap: 0;
    padding: 8px 12px 14px;
    box-shadow: 0 10px 24px rgba(15, 31, 44, .08);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 14px;
    border-radius: 8px;
  }

  .header-cta {
    display: none;
  }

  .section {
    padding: 44px 0;
  }

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

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

  .how-grid {
    grid-template-columns: 1fr;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-search {
    grid-template-columns: 1fr 1fr;
  }

  .form-row.two {
    grid-template-columns: 1fr;
  }

  .value-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 22px;
  }
}

@media (max-width: 440px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .page-search {
    grid-template-columns: 1fr;
  }

  .seller-card {
    grid-template-columns: auto 1fr;
  }

  .call-btn {
    grid-column: 1 / -1;
  }
}