/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
  line-height: 1.6;
}
a { color: #0071e3; text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Header === */
header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.logo { font-size: .95rem; font-weight: 600; letter-spacing: .02em; opacity: .9; }
.tagline { font-size: .85rem; opacity: .7; }
.lang-switch { margin-left: auto; display: flex; gap: .4rem; }
.lang-btn {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: .3rem .7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: .8rem;
  transition: background .2s;
}
.lang-btn.active, .lang-btn:hover { background: rgba(255,255,255,.3); }

/* === Hero === */
.hero {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  background: linear-gradient(180deg, #0f3460 0%, #f5f5f7 100%);
  color: #fff;
}
.hero h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: .5rem; }
.hero p { font-size: 1rem; opacity: .85; }

/* === Filters === */
.filters {
  max-width: 1200px;
  margin: -1rem auto 0;
  padding: 1.2rem 1.5rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: end;
}
.filter-group { display: flex; flex-direction: column; gap: .3rem; flex: 1; min-width: 160px; }
.filter-group label { font-size: .75rem; font-weight: 600; color: #666; text-transform: uppercase; }
.filter-group select, .filter-group input {
  padding: .5rem .7rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: .9rem;
  background: #fafafa;
  transition: border-color .2s;
}
.filter-group select:focus, .filter-group input:focus {
  outline: none;
  border-color: #0071e3;
}

/* === Stats === */
.stats {
  max-width: 1200px;
  margin: 1rem auto .5rem;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: #666;
}

/* === Items Grid === */
.items-grid {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}

/* === Item Card === */
.item-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
.item-card .card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fafafa;
  padding: 8px;
}
.item-card .card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.item-card .card-category {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .3rem;
}
.item-card .card-category.pokemon { color: #E53935; }
.item-card .card-category.jump { color: #4CAF50; }
.item-card .card-category.loft { color: #FF9800; }
.item-card .card-category.calbee { color: #795548; }
.item-card .card-category.tokyo-station { color: #00897B; }
.item-card .card-category.anime-collab { color: #7B1FA2; }
.item-card .card-category.game { color: #1565C0; }
.item-card .card-category.hobby { color: #D84315; }
.item-card .card-category.cosme { color: #EC407A; }
.item-card .card-category.stationery { color: #5C6BC0; }

.item-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; line-height: 1.4; }

.item-card .card-meta {
  font-size: .8rem;
  color: #666;
  margin-bottom: .3rem;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.item-card .card-meta .icon { font-size: .9rem; }
.item-card .card-desc {
  font-size: .82rem;
  color: #444;
  margin: .5rem 0;
  flex: 1;
}
.item-card .card-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.item-card .card-tags span {
  background: #f0f0f0;
  color: #555;
  padding: .15rem .5rem;
  border-radius: 20px;
  font-size: .7rem;
}
.item-card .card-footer {
  padding: .8rem 1rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.item-card .card-footer a {
  font-size: .8rem;
  font-weight: 600;
}
.status-badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
}
.status-badge.on-sale { background: #e8f5e9; color: #2e7d32; }
.status-badge.upcoming { background: #fff3e0; color: #e65100; }
.status-badge.always { background: #e3f2fd; color: #1565c0; }
.status-badge.lottery { background: #fce4ec; color: #c62828; }
.status-badge.limited { background: #f3e5f5; color: #6a1b9a; }

/* === Store Section === */
.store-section {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 2rem 1.5rem;
}
.store-section h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 1.2rem; }
.store-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 1.5rem; }
.store-list {
  background: #fff;
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.store-list h3 { font-size: 1rem; font-weight: 700; margin-bottom: .8rem; color: #333; }
.store-regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; }
.store-region h4 { font-size: .8rem; font-weight: 600; color: #666; margin-bottom: .3rem; }
.store-region ul { list-style: none; font-size: .8rem; color: #444; }
.store-region ul li { padding: .1rem 0; }
.store-list > ul { list-style: none; font-size: .85rem; }
.store-list > ul li { padding: .2rem 0; }

/* === Footer === */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  background: #1d1d1f;
  color: rgba(255,255,255,.6);
  font-size: .8rem;
}
.footer-sources { margin-top: .5rem; }
.footer-sources a { color: rgba(255,255,255,.7); }
.footer-sources a:hover { color: #fff; }
.footer-links { margin-top: .5rem; }
.footer-links a { color: rgba(255,255,255,.7); }
.footer-links a:hover { color: #fff; }

/* === No Results === */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: #999;
  font-size: 1.1rem;
}

/* === Product Detail Modal === */
.modal-overlay {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.55);
  z-index: 200;
  justify-content: center; align-items: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 18px;
  max-width: 860px; width: 100%;
  max-height: 90vh;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: modalIn .25s ease;
  display: flex; flex-direction: row;
  overflow: hidden;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(30px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute; top: .5rem; right: .5rem;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: #e0e0e0; color: #333;
  font-size: 1.1rem; cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.modal-close:hover { background: #ccc; }
.modal-img-wrap {
  position: relative; background: #fafafa;
  flex: 0 0 40%; display: flex; align-items: center; justify-content: center;
  min-height: 200px;
}
.modal-img {
  width: 100%; height: 100%; max-height: 80vh; object-fit: contain; display: block; padding: 10px;
}
.modal-body {
  flex: 1; padding: 1.2rem 1.5rem;
  display: flex; flex-direction: column;
  overflow-y: auto; position: relative;
}
.modal-cat {
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: .2rem;
}
.modal-cat.pokemon { color: #E53935; }
.modal-cat.jump { color: #4CAF50; }
.modal-cat.loft { color: #FF9800; }
.modal-cat.calbee { color: #795548; }
.modal-cat.tokyo-station { color: #00897B; }
.modal-cat.anime-collab { color: #7B1FA2; }
.modal-cat.game { color: #1565C0; }
.modal-cat.hobby { color: #D84315; }
.modal-cat.cosme { color: #EC407A; }
.modal-cat.stationery { color: #5C6BC0; }
.modal-name { font-size: 1.1rem; font-weight: 800; margin-bottom: .5rem; line-height: 1.35; }
.modal-info-grid {
  display: grid; grid-template-columns: auto 1fr; gap: .2rem .6rem;
  font-size: .8rem; margin-bottom: .5rem;
}
.modal-info-label { color: #888; font-weight: 600; white-space: nowrap; }
.modal-info-value { color: #333; }
.modal-desc {
  font-size: .8rem; color: #444; line-height: 1.6;
  margin-bottom: .5rem; padding: .6rem .8rem;
  background: #f9f9fb; border-radius: 8px;
  flex-shrink: 1; overflow: hidden;
}
.modal-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .6rem; }
.modal-tags span {
  background: #f0f0f0; color: #555;
  padding: .15rem .5rem; border-radius: 20px; font-size: .7rem;
}
.modal-actions { margin-top: auto; }
.modal-btn-request {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  background: linear-gradient(135deg, #e53935, #ff7043);
  color: #fff; padding: .75rem 1.2rem; border-radius: 50px;
  font-size: .95rem; font-weight: 700; text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(229,57,53,.3);
  width: 100%;
}
.modal-btn-request:hover {
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(229,57,53,.4);
  text-decoration: none;
}

/* === Responsive === */
@media (max-width: 768px) {
  header { padding: .7rem 1rem; }
  .header-inner { flex-direction: row; align-items: center; flex-wrap: nowrap; text-align: left; gap: .6rem; }
  .logo-sub { display: none; }
  .tagline { display: none; }
  .logo { white-space: nowrap; flex-shrink: 0; }
  .lang-switch { margin-left: auto; flex-shrink: 0; }
  .lang-btn { white-space: nowrap; }
  .hero { padding: 2rem 1rem 1.5rem; }
  .hero h2 { font-size: 1.3rem; }
  .filters { flex-direction: column; padding: 1rem; }
  .items-grid { grid-template-columns: 1fr; padding: 0 1rem; }
  .modal { flex-direction: column; max-height: 92vh; }
  .modal-img-wrap { flex: 0 0 auto; max-height: 35vh; }
  .modal-img { max-height: 35vh; }
  .modal-body { padding: .8rem 1rem; overflow-y: auto; }
  .modal-name { font-size: 1rem; }
  .modal-close { width: 44px; height: 44px; font-size: 1.25rem; top: .4rem; right: .4rem; }
}
@media (max-width: 380px) {
  .hero h2 { font-size: 1.15rem; }
  .logo { font-size: .85rem; }
  .lang-btn { padding: .2rem .45rem; font-size: .7rem; }
}
