:root {
  --bg: #f4f4f4;
  --bg-soft: #ebebeb;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-muted: #5a5a5a;
  --line: #d6d6d6;
  --accent: #222222;
  --accent-hover: #000000;
  --price: #2d2d2d;
  --max: 1120px;
  --radius: 2px;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ececec 0%, var(--bg) 180px),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 11px,
      rgba(0, 0, 0, 0.015) 11px,
      rgba(0, 0, 0, 0.015) 12px
    );
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.site-wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  height: 48px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.brand-tag {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
}

.header-actions a {
  color: var(--ink-muted);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font: inherit;
}

/* Nav */
.site-nav {
  background: var(--ink);
  color: #fff;
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  padding: 0.35rem 0;
  align-items: center;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  align-items: center;
}

.nav-list > li {
  position: relative;
}

.nav-list > li > a {
  display: block;
  color: #f0f0f0;
  padding: 0.55rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav-list > li > a:hover,
.nav-list > li:hover > a,
.nav-list > li > a.is-active {
  background: #353535;
  color: #fff;
  text-decoration: none;
}

.nav-list .has-dropdown > a::after {
  content: " ▾";
  font-size: 0.75em;
  opacity: 0.7;
}

.dropdown {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 220px;
  background: #2a2a2a;
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  z-index: 40;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
  display: block;
}

.dropdown a {
  display: block;
  color: #eee;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  text-decoration: none;
}

.dropdown a:hover {
  background: #404040;
  text-decoration: none;
}

.top-links {
  margin-left: auto;
}

.top-links a {
  font-weight: 500;
  opacity: 0.92;
}

/* Main */
.site-main {
  flex: 1;
  padding: 1.75rem 0 2.5rem;
}

.page-header {
  margin: 0 0 1.25rem;
}

.page-header h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  line-height: 1.25;
  font-weight: 700;
}

.page-header p,
.lead {
  color: var(--ink-muted);
  margin: 0.4rem 0 0;
  max-width: 62ch;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.hero-media {
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.hero-copy {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.25rem 1.4rem;
}

.hero-copy h1 {
  margin-top: 0;
}

/* Product grid */
.product-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.25rem 0;
}

.product-card {
  flex: 1 1 200px;
  max-width: 240px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
  border-color: #999;
  transform: translateY(-2px);
  text-decoration: none;
}

.product-card .thumb {
  aspect-ratio: 1;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card .name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.35;
}

.product-card .price {
  margin-top: auto;
  font-weight: 700;
  color: var(--price);
}

.section-title {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.4rem;
}

/* Content */
.content-block {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.25rem 1.4rem;
}

.content-block p {
  margin: 0 0 0.85rem;
}

.product-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.25rem;
}

.product-detail .gallery {
  flex: 1 1 260px;
  max-width: 360px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.product-detail .info {
  flex: 2 1 280px;
}

.product-detail .price-lg {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0.75rem 0;
}

.blog-container {
  margin: 1rem 0;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1rem 1.2rem;
  transition: border-color 0.2s ease;
}

.blog-card:hover {
  border-color: #999;
}

.blog-title {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.blog-preview {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.romlicontainer {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.25rem 1.4rem;
}

/* Footer */
.site-footer {
  background: #1a1a1a;
  color: #dcdcdc;
  padding: 2rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
}

.footer-col {
  flex: 1 1 200px;
}

.footer-col h4 {
  margin: 0 0 0.6rem;
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-col p,
.footer-col li {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #c8c8c8;
}

.footer-col a {
  color: #eee;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.35rem;
}

.footer-social img {
  width: 36px;
  height: 36px;
  margin-top: 0.5rem;
}

.site-footer .romlifooter {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
}

/* Mobile */
@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-row {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .top-links {
    margin-left: 0;
  }

  .dropdown {
    position: static;
    display: none;
    box-shadow: none;
    background: #222;
  }

  .has-dropdown.is-open > .dropdown {
    display: block;
  }

  .product-card {
    max-width: none;
    flex: 1 1 calc(50% - 0.5rem);
  }
}

@media (max-width: 480px) {
  .product-card {
    flex: 1 1 100%;
  }

  .brand-tag {
    display: none;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy,
.product-card,
.content-block {
  animation: fade-up 0.45s ease both;
}

.product-card:nth-child(2) {
  animation-delay: 0.05s;
}
.product-card:nth-child(3) {
  animation-delay: 0.1s;
}
.product-card:nth-child(4) {
  animation-delay: 0.15s;
}
