:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f1f4fb;
  --text: #252938;
  --muted: #636b7f;
  --border: #e7ebf3;
  --primary: #4f73d9;
  --primary-2: #8b5cf6;
  --danger: #b42318;
  --shadow: 0 18px 42px rgba(26, 35, 53, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Noto Sans SC", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 78% 12%, rgba(139, 92, 246, 0.24), transparent 27%),
    radial-gradient(circle at 72% 8%, rgba(79, 115, 217, 0.2), transparent 24%), var(--bg);
}

.bg-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.44) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.44) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.3;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  position: relative;
}

.top-nav,
.site-header {
  padding: 1.4rem 0 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-actions {
  display: inline-flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.08rem;
}

.brand-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
}

.front-main {
  flex: 1;
  padding: 0.5rem 0 2rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 1.2rem;
  align-items: center;
  padding: 1.4rem 0 1.8rem;
}

.eyebrow {
  margin: 0;
  color: var(--primary-2);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0.5rem 0;
  font-size: clamp(1.8rem, 4.2vw, 3.15rem);
  line-height: 1.15;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.1vw, 1.72rem);
}

.chip {
  text-decoration: none;
  border-radius: 999px;
  background: #e9edf4;
  color: #2d3446;
  padding: 0.62rem 1.2rem;
  font-weight: 600;
}

.chip-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.visual-card {
  width: min(440px, 100%);
  aspect-ratio: 1.1/0.8;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(79, 115, 217, 0.35), rgba(139, 92, 246, 0.35));
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(260px, 72%);
  max-height: 92%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(32, 42, 65, 0.16));
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0.3rem 0 1.3rem;
}

.feature-card,
.panel,
.product-card,
.meta-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-card {
  padding: 1rem;
}

.feature-card h3 {
  margin: 0;
  font-size: 1rem;
}

.feature-card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.section-title {
  margin: 0 0 1rem;
  font-size: 1.18rem;
}

.product-section {
  margin-top: 0.3rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.82rem;
}

.product-card {
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.product-card:hover {
  transform: translateY(-3px);
}

.product-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.product-body {
  padding: 0.85rem 0.95rem 1rem;
}

.product-name {
  margin: 0;
  font-weight: 600;
  font-size: 0.98rem;
}

.empty {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 1rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
}

.footer-inner {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  color: var(--muted);
  font-size: 0.93rem;
  flex-wrap: wrap;
}

.site-header {
  padding-top: 2rem;
}

.admin-link {
  text-decoration: none;
  color: #fff;
  background: #3c4a68;
  border-radius: 10px;
  padding: 0.66rem 0.92rem;
}

.admin-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1rem;
  padding-bottom: 2rem;
}

.panel {
  padding: 1rem;
}

.form-grid {
  display: grid;
  gap: 0.8rem;
}

.help-text {
  margin-top: -0.3rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

label,
legend {
  font-size: 0.92rem;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.68rem 0.75rem;
  background: #fff;
  font: inherit;
  color: var(--text);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid #dde7ff;
  border-color: var(--primary);
}

.form-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  font: inherit;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
}

.btn-ghost {
  color: var(--text);
  background: var(--surface-soft);
}

.btn-danger {
  color: #fff;
  background: var(--danger);
}

.admin-product-list {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.6rem;
}

.admin-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.admin-item img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
}

.admin-item h3 {
  margin: 0;
  font-size: 0.95rem;
}

.admin-item p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  word-break: break-all;
}

.item-actions {
  display: flex;
  gap: 0.45rem;
}

.visit-config {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0;
  padding: 0.6rem 0.7rem 0.75rem;
}

.inline-option {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-right: 0.8rem;
}

.inline-option input {
  width: auto;
  margin: 0;
}

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

.hidden {
  display: none;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .feature-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .top-nav {
    flex-direction: column;
    align-items: flex-start;
  }
  .feature-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    justify-content: flex-start;
    padding: 0.65rem 0;
    gap: 0.5rem;
  }
}
