:root {
  color-scheme: light;
  --ink: #2a2430;
  --muted: #6f6375;
  --line: #eadfe8;
  --paper: #fff9fb;
  --soft: #fff0f6;
  --mint: #dff7ee;
  --berry: #d84f86;
  --berry-dark: #94335b;
  --gold: #e2b549;
  --sakura: #ffd8e7;
  --shadow: 0 16px 42px rgba(107, 48, 82, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

body.modal-open {
  overflow: hidden;
}

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

.hero {
  min-height: 70vh;
  padding: 10px clamp(18px, 5vw, 72px) 14px;
  background:
    linear-gradient(90deg, rgba(255, 249, 251, 0.97), rgba(255, 249, 251, 0.72) 46%, rgba(255, 249, 251, 0.22)),
    image-set(
      url("assets/nekotaku-hero-1280.webp") 1x,
      url("assets/nekotaku-hero-1920.webp") 2x
    ) center right / cover;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-actions a {
  padding: 10px 12px;
  border-bottom: 2px solid transparent;
  font-weight: 700;
}

.topbar-actions a:hover {
  border-color: var(--berry);
}

.hero-content {
  width: min(720px, 100%);
  padding: clamp(8px, 2vh, 20px) 0 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--berry-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3.4rem, 12vw, 8rem);
  line-height: 0.9;
}

.hero-logo {
  width: min(480px, 100%);
}

.hero-logo img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 18px rgba(68, 38, 27, 0.12));
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1;
}

.hero-copy,
.section-heading p,
footer p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-copy {
  margin: 6px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.button,
.icon-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
}

.primary {
  background: var(--berry);
  color: #fff;
  box-shadow: var(--shadow);
}

.mobile-selection-button {
  display: none;
}

.ghost {
  border: 1px solid rgba(149, 56, 95, 0.32);
  background: rgba(255, 255, 255, 0.74);
}

main {
  padding: 0 clamp(16px, 5vw, 72px) 52px;
}

.seo-header {
  padding: 28px clamp(16px, 5vw, 72px) 24px;
  background:
    linear-gradient(90deg, rgba(255, 249, 251, 0.98), rgba(255, 249, 251, 0.84)),
    image-set(
      url("assets/nekotaku-hero-1280.webp") 1x,
      url("assets/nekotaku-hero-1920.webp") 2x
    ) center right / cover;
}

.seo-logo {
  display: block;
  width: min(280px, 76vw);
  margin-bottom: 18px;
}

.seo-logo img {
  width: 100%;
  display: block;
}

.seo-header h1 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 0.95;
}

.seo-header p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.seo-main {
  padding-top: 24px;
}

.seo-category-links,
.footer-seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seo-category-links {
  margin-bottom: 28px;
}

.seo-category-links a,
.footer-seo-links a {
  border: 1px solid rgba(216, 79, 134, 0.22);
  border-radius: 999px;
  background: #fff;
  color: var(--berry-dark);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 12px;
}

.toolbar {
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 64px 46px;
  gap: 12px;
  align-items: end;
  margin: 8px 0 0;
  padding: 12px;
  background: rgba(255, 250, 252, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.search-block {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0 12px;
}

input.is-filter-active,
select.is-filter-active {
  border-color: rgba(216, 79, 134, 0.72);
  background: #fff1f7;
  box-shadow: inset 0 0 0 1px rgba(216, 79, 134, 0.18), 0 0 0 3px rgba(216, 79, 134, 0.1);
}

.icon-button {
  width: 46px;
  height: 44px;
  background: var(--mint);
  color: var(--ink);
  font-size: 1.35rem;
}

.reset-button {
  background: #fff1f3;
  color: #d12f45;
  font-size: 1.8rem;
  line-height: 1;
  border: 1px solid rgba(209, 47, 69, 0.22);
}

.search-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--berry);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(216, 79, 134, 0.18);
}

.quick-tags {
  margin: 10px 0 0;
}

.quick-tags-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 252, 0.96);
  box-shadow: 0 10px 26px rgba(86, 54, 77, 0.08);
  backdrop-filter: blur(14px);
}

.quick-tags-label {
  display: block;
  flex: 0 0 auto;
  min-width: 78px;
  margin: 0 2px 0 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
}

.quick-tags-arrow {
  display: none;
}

.quick-tags-list {
  display: flex;
  flex-wrap: wrap;
  flex: 1 1 auto;
  gap: 8px;
}

.quick-tag {
  min-height: 30px;
  border: 1px solid rgba(216, 79, 134, 0.22);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0 10px;
}

.quick-tag:hover,
.quick-tag.is-active {
  border-color: rgba(216, 79, 134, 0.64);
  background: #ffe5ef;
  color: var(--berry-dark);
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 54px;
}

.category-card {
  min-height: 218px;
  padding: 10px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(86, 54, 77, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.category-card:hover {
  border-color: rgba(216, 79, 134, 0.45);
  box-shadow: 0 14px 34px rgba(107, 48, 82, 0.14);
  transform: translateY(-2px);
}

.category-card-filter {
  background: linear-gradient(135deg, #fff6fa, #fffdf8);
  border-color: rgba(216, 79, 134, 0.36);
}

.category-card.is-active,
.category-card-filter.is-active {
  background: linear-gradient(135deg, #ffe0ec, #fff6f0);
  border-color: rgba(216, 79, 134, 0.72);
  box-shadow: 0 14px 34px rgba(216, 79, 134, 0.18);
}

.category-card strong {
  display: block;
  min-height: 20px;
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.15;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-card span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.category-visual {
  height: 126px;
  margin-top: 2px;
  border-radius: 8px;
  background: #fff6f9;
  overflow: hidden;
  display: block;
}

.category-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.catalogue {
  margin: 0 auto;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 24px;
}

.section-heading .eyebrow:empty {
  display: none;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  max-width: none;
}

.category-product-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.category-product-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.category-product-heading .eyebrow {
  margin: 0;
}

.category-product-heading a {
  color: var(--berry-dark);
  font-weight: 900;
  text-decoration: none;
}

.category-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(86, 54, 77, 0.1);
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}

.product-media {
  width: 100%;
  border: 0;
  aspect-ratio: 1;
  background: #fff;
  cursor: zoom-in;
  display: grid;
  overflow: hidden;
  place-items: center;
  padding: 10px;
}

.product-media:focus-visible {
  outline: 3px solid rgba(216, 79, 134, 0.36);
  outline-offset: -3px;
}

.product-visual {
  width: min(156px, 78%);
  aspect-ratio: 1;
  border: 5px solid rgba(255, 255, 255, 0.86);
  border-radius: 28px;
  background: rgba(255, 253, 250, 0.9);
  color: var(--berry-dark);
  display: grid;
  place-items: center;
  font-size: clamp(1.5rem, 4vw, 2.7rem);
  font-weight: 900;
  text-align: center;
  box-shadow: 0 14px 28px rgba(107, 48, 82, 0.14);
}

.product-media img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.product-body {
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 8px;
  padding: 12px;
}

.badge {
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--mint);
  color: #2f6c57;
  font-size: 0.7rem;
  font-weight: 800;
}

.product-card h3 {
  display: -webkit-box;
  min-height: calc(0.92rem * 1.25 * 3);
  max-height: calc(0.92rem * 1.25 * 3);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.25;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
}

.price {
  flex: 0 0 auto;
  color: var(--berry-dark);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.amazon-link {
  min-height: 40px;
  margin-top: 4px;
  border-radius: 8px;
  background: var(--gold);
  color: #241a05;
  font-size: 0.8rem;
  line-height: 1.1;
  text-align: center;
}

.search-more-card {
  grid-column: span 5;
  width: min(100%, 680px);
  min-height: 150px;
  border: 1px dashed rgba(216, 79, 134, 0.45);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff6fa, #fffdf8);
  box-shadow: 0 10px 28px rgba(86, 54, 77, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.search-more-card h3 {
  margin: 12px 0 8px;
}

.search-more-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.search-more-link {
  margin: 18px auto 0;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 42px 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
}

.image-modal.is-open {
  display: grid;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(42, 36, 48, 0.72);
  cursor: zoom-out;
}

.image-modal-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(88vh, 860px);
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(42, 36, 48, 0.34);
  display: grid;
  gap: 12px;
}

.image-modal-panel img {
  width: 100%;
  max-height: calc(88vh - 104px);
  object-fit: contain;
  display: block;
}

.image-modal-panel figcaption {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.image-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(209, 47, 69, 0.22);
  border-radius: 999px;
  background: #fff1f3;
  color: #d12f45;
  cursor: pointer;
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
}

footer {
  padding: 26px clamp(16px, 5vw, 72px) 36px;
}

footer p {
  margin: 0;
  font-size: 0.92rem;
}

.footer-seo-links {
  margin-top: 14px;
}

@media (max-width: 1000px) {
  .category-product-grid,
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .category-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .icon-button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: auto;
    padding: 8px 16px 18px;
    background:
      linear-gradient(180deg, rgba(255, 249, 251, 0.98), rgba(255, 249, 251, 0.8)),
      url("assets/nekotaku-hero-1280.webp") center / cover;
  }

  .hero-content {
    padding-top: 0;
  }

  .hero .eyebrow {
    margin-bottom: 6px;
    overflow: hidden;
    font-size: clamp(0.62rem, 2.4vw, 0.76rem);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-logo {
    width: min(360px, 100%);
  }

  .hero-copy {
    margin-top: 4px;
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .hero-actions {
    display: none;
  }

  .mobile-selection-button {
    display: inline-flex;
    min-height: 44px;
    padding: 0 10px;
    font-size: 0.86rem;
    line-height: 1.1;
    text-align: center;
  }

  .toolbar {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr) minmax(64px, 0.72fr) 44px 44px;
    gap: 8px;
    margin-top: 8px;
    padding: 10px;
  }

  .mobile-selection-button {
    grid-column: 1 / 3;
  }

  .search-block {
    grid-column: 3 / -1;
  }

  .category-control {
    grid-column: 1 / 3;
  }

  .budget-control {
    grid-column: 3 / 4;
  }

  .search-button {
    grid-column: 4 / 5;
    min-height: 44px;
    padding: 0;
    font-size: 0.78rem;
  }

  .reset-button {
    grid-column: 5 / 6;
    width: 44px;
    min-width: 44px;
  }

  label {
    margin-bottom: 4px;
    font-size: 0.66rem;
  }

  .search-block label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  input,
  select {
    min-height: 44px;
    padding: 0 8px;
    font-size: 0.88rem;
  }

  main {
    padding: 0 16px 40px;
  }

  .search-more-card {
    grid-column: 1 / -1;
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-tags-inner {
    display: grid;
    align-items: center;
    min-height: 46px;
    padding: 8px 10px;
  }

  .quick-tags-label {
    width: 100%;
    min-width: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .quick-tags-arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 160ms ease;
  }

  .quick-tags.is-open .quick-tags-arrow {
    transform: rotate(225deg) translateY(-1px);
  }

  .quick-tags:not(.is-open) .quick-tags-list {
    display: none;
  }

  .quick-tags-list {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding-top: 8px;
  }

  .quick-tag {
    min-height: 28px;
    font-size: 0.78rem;
    padding: 0 8px;
  }

  .category-product-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 36px;
  }

  .category-card {
    min-height: 190px;
    padding: 9px 8px;
  }

  .category-card strong {
    font-size: 0.94rem;
  }

  .category-card span {
    font-size: 0.74rem;
  }

  .category-visual {
    height: 104px;
  }

  .category-product-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-body {
    gap: 6px;
    padding: 9px;
  }

  .badge {
    font-size: 0.62rem;
  }

  .product-card h3 {
    min-height: calc(0.78rem * 1.2 * 3);
    max-height: calc(0.78rem * 1.2 * 3);
    font-size: 0.78rem;
    line-height: 1.2;
  }

  .product-meta {
    min-height: 24px;
  }

  .price {
    font-size: 0.88rem;
  }

  .amazon-link {
    min-height: 36px;
    padding: 0 8px;
    font-size: 0.7rem;
  }
}
