/* ============================================================
   DESIGN SYSTEM — Timeless, Functional, Unhesitating
   Inspired by: Braun/Dieter Rams + Japanese retail clarity
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

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

:root {
  /* Neutral palette — warm grays, not cold */
  --bg:        #FAFAF8;
  --bg-card:   #FFFFFF;
  --bg-filter: #F4F3F0;
  --bg-hover:  #EEEDEA;
  --border:    #E2E0DB;
  --border-active: #1A1A1A;

  --text-primary:   #1A1A1A;
  --text-secondary: #6B6860;
  --text-tertiary:  #9C9890;
  --text-price:     #C23616;

  --accent:       #1A1A1A;
  --accent-hover: #333333;
  --accent-tag:   #E8E6E1;

  /* Typography scale */
  --font-jp: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --font-en: 'DM Sans', 'Noto Sans JP', sans-serif;

  --text-xs:  0.75rem;
  --text-sm:  0.8125rem;
  --text-base: 0.875rem;
  --text-md:  1rem;
  --text-lg:  1.125rem;
  --text-xl:  1.5rem;
  --text-2xl: 2rem;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration: 0.2s;

  /* Layout */
  --sidebar-w: 280px;
  --max-w: 1600px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-jp);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
}

/* ---- TJ Logo SVG ---- */
.tj-logo {
  display: inline-block;
  height: 32px;
  width: auto;
}
.tj-logo-white { display: none; }

/* ---- Main Header (black bar) ---- */
.main-header {
  background: var(--accent);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.main-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-2) var(--sp-8);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-6);
}
.header-store-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.12em;
  margin-right: auto;
}
.mobile-cart-btn {
  display: none;
  color: white;
  padding: var(--sp-2);
}
.mobile-cart-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}
.main-nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color var(--duration) var(--ease);
  white-space: nowrap;
}
.main-nav a:hover { color: white; }
.nav-icon {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}
.nav-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

/* Hamburger — mobile only */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
  color: white;
}
.hamburger-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.mobile-menu {
  display: none;
  background: var(--accent);
  padding: var(--sp-4) var(--sp-8);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: var(--text-sm);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color var(--duration) var(--ease);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: white; }

/* ---- Search Bar ---- */
.search-bar {
  background: #ECEAE5;
  border-bottom: 1px solid var(--border);
}
.search-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-8);
}
.search-input-wrap {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}
.search-icon {
  position: absolute;
  left: var(--sp-4);
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: var(--sp-3) var(--sp-10) var(--sp-3) var(--sp-10);
  font-family: var(--font-jp);
  font-size: var(--text-base);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,26,26,0.08);
}
.search-input::placeholder {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}
.search-clear {
  position: absolute;
  right: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-1);
  color: var(--text-tertiary);
  border-radius: 50%;
  transition: color var(--duration) var(--ease);
}
.search-clear:hover { color: var(--text-primary); }
.search-clear svg { width: 16px; height: 16px; }

/* Search dropdown */
.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 100;
  overflow: hidden;
}
.search-dropdown.open { display: block; }

.search-dropdown-cat {
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  text-decoration: none;
  color: var(--text-primary);
  transition: background var(--duration) var(--ease);
  font-size: var(--text-sm);
}
.search-dropdown-item:hover { background: var(--bg-hover); }
.search-dropdown-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 4px;
  background: var(--bg-filter);
  flex-shrink: 0;
}
.search-dropdown-item-info {
  flex: 1;
  min-width: 0;
}
.search-dropdown-item-title {
  font-size: var(--text-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-dropdown-item-maker {
  font-size: 10px;
  color: var(--text-tertiary);
  font-family: var(--font-en);
  text-transform: uppercase;
}
.search-dropdown-item-price {
  font-family: var(--font-en);
  font-size: var(--text-xs);
  font-weight: 600;
  flex-shrink: 0;
}
.search-dropdown-cat-count {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-en);
}

.search-dropdown-all {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border);
  background: var(--bg-filter);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.search-dropdown-all:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.search-dropdown-all strong {
  color: var(--text-primary);
  font-weight: 600;
}
.search-dropdown-all svg:last-child { margin-left: auto; }

@media (max-width: 768px) {
  .search-bar-inner { padding: var(--sp-3) var(--sp-4); }
  .search-input { font-size: var(--text-sm); }
}

/* ---- Loading Screen ---- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Page Header ---- */
.page-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.page-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-8);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.page-header-left {
  flex: 1;
}
.page-header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
}
.page-header-logo .tj-logo {
  height: 80px;
  opacity: 0.18;
}
.breadcrumb {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--sp-3);
  font-family: var(--font-en);
}
.breadcrumb a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}
.breadcrumb a:hover { color: var(--text-primary); }
.breadcrumb span { margin: 0 var(--sp-2); }

.page-title-row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
}
.page-title {
  font-family: var(--font-en);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.page-title-jp {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 400;
}
.result-count {
  font-family: var(--font-en);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-weight: 400;
}
.result-count strong {
  color: var(--text-primary);
  font-weight: 600;
}
.back-to-cat-btn {
  font-family: var(--font-jp);
  font-size: var(--text-xs);
  color: var(--accent);
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px var(--sp-2);
  cursor: pointer;
  margin-left: var(--sp-2);
  transition: all var(--duration) var(--ease);
}
.back-to-cat-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ---- Main Layout ---- */
.main-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-8);
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: var(--sp-8);
  align-items: start;
}

/* ---- Sidebar Filters ---- */
.sidebar {
  position: sticky;
  top: var(--sp-4);
  max-height: calc(100vh - var(--sp-8));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  padding-right: var(--sp-4);
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; margin: var(--sp-2) 0; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.filter-section {
  margin-bottom: var(--sp-6);
}
.filter-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  font-family: var(--font-en);
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.filter-label::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--text-tertiary);
  border-bottom: 1.5px solid var(--text-tertiary);
  transform: rotate(45deg);
  transition: transform var(--duration) var(--ease);
  margin-top: -3px;
}
.filter-section.collapsed .filter-label::after {
  transform: rotate(-45deg);
  margin-top: 3px;
}
.filter-options {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  overflow: hidden;
  transition: max-height 0.3s var(--ease);
}
.filter-section.collapsed .filter-options {
  max-height: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  margin: 0 !important;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--duration) var(--ease),
              opacity 180ms ease,
              max-height 360ms cubic-bezier(0.22,1,0.36,1),
              padding-top 360ms cubic-bezier(0.22,1,0.36,1),
              padding-bottom 360ms cubic-bezier(0.22,1,0.36,1);
  font-size: var(--text-sm);
  overflow: hidden;
}
.filter-option.removing {
  opacity: 0;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none;
  transition: background var(--duration) var(--ease),
              opacity 180ms ease 0ms,
              max-height 140ms cubic-bezier(0.4,0,1,1) 180ms,
              padding-top 140ms cubic-bezier(0.4,0,1,1) 180ms,
              padding-bottom 140ms cubic-bezier(0.4,0,1,1) 180ms;
}
.filter-option:hover {
  background: var(--bg-hover);
}

/* Custom checkbox */
.filter-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  flex-shrink: 0;
  position: relative;
  transition: all var(--duration) var(--ease);
}
.filter-option.active .filter-checkbox {
  background: var(--accent);
  border-color: var(--accent);
}
.filter-option.active .filter-checkbox::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.filter-option-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-option-count {
  font-family: var(--font-en);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* Size grid */
.filter-options.size-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-1);
  flex-direction: unset;
}
.filter-options.size-grid .filter-option {
  justify-content: center;
  padding: var(--sp-2);
  font-family: var(--font-en);
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 4px;
  gap: 0;
}
.filter-options.size-grid .filter-option .filter-checkbox { display: none; }
.filter-options.size-grid .filter-option .filter-option-count { display: none; }
.filter-options.size-grid .filter-option.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Color swatches */
.filter-options.color-grid {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: var(--sp-3);
  padding: var(--sp-2);
}
.filter-options.color-grid .filter-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  padding: 0;
  border: 2px solid var(--border);
  position: relative;
  gap: 0;
  flex-shrink: 0;
  transition: all var(--duration) var(--ease);
}
.filter-options.color-grid .filter-option .filter-checkbox { display: none; }
.filter-options.color-grid .filter-option .filter-option-text { display: none; }
.filter-options.color-grid .filter-option .filter-option-count { display: none; }
.filter-options.color-grid .filter-option.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
}

/* Active filters bar */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  min-height: 0;
}
.active-filters:empty { display: none; }
.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  background: var(--accent-tag);
  border-radius: 100px;
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--duration) var(--ease);
}
.active-filter-tag:hover { background: var(--border); }
.active-filter-tag .remove {
  font-size: 14px;
  line-height: 1;
  opacity: 0.5;
}
.clear-all-btn {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-1) var(--sp-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.clear-all-btn:hover { color: var(--text-primary); }

/* ---- Toolbar ---- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.sort-select {
  font-family: var(--font-jp);
  font-size: var(--text-sm);
  padding: var(--sp-2) var(--sp-4);
  padding-right: var(--sp-8);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%236B6860' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color var(--duration) var(--ease);
}
.sort-select:hover { border-color: var(--border-active); }

.view-toggle {
  display: flex;
  gap: var(--sp-1);
  background: var(--bg-filter);
  border-radius: 6px;
  padding: 2px;
}
.view-btn {
  padding: var(--sp-2) var(--sp-3);
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  color: var(--text-tertiary);
  transition: all var(--duration) var(--ease);
  display: flex;
  align-items: center;
}
.view-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.view-btn svg { width: 16px; height: 16px; }

/* ---- Product Grid ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-5);
  transition: opacity 0.2s var(--ease);
}
.product-grid.fade { opacity: 0.3; }

.product-grid.list-view {
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}

/* ---- Product Card ---- */
.product-card {
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border-color: var(--border);
}

.product-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  background: #F8F8F6;
  position: relative;
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--sp-4);
  transition: transform 0.4s var(--ease);
}
.product-card:hover .product-img-wrap img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  padding: 2px var(--sp-2);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-en);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}
.badge-new {
  background: var(--accent);
  color: white;
}
.badge-restock {
  background: #2E7D32;
  color: white;
}
.restock-banner {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: #e53935;
  color: #fff;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 0;
  z-index: 3;
}
.pricedrop-banner {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: #e53935;
  color: #fff;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 0;
  z-index: 3;
}
.badge-relaunch {
  background: #E65100;
  color: white;
}
.badge-sale {
  background: var(--text-price);
  color: white;
}
.badge-preorder {
  background: #5B21B6;
  color: white;
}
.badge-event {
  background: #FFD600;
  color: #111;
}

.product-promo-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-1);
  min-height: 20px;
}
.product-promo-row:empty { display: none; }
.product-disco {
  font-family: var(--font-en);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-price);
  background: #FFF0ED;
  padding: 1px var(--sp-2);
  border-radius: 3px;
}
.product-point {
  font-family: var(--font-en);
  font-size: var(--text-xs);
  font-weight: 500;
  color: #1565C0;
  background: #E3F2FD;
  padding: 1px var(--sp-2);
  border-radius: 3px;
}

.product-info {
  padding: var(--sp-4);
}
.product-maker {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
  font-family: var(--font-en);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-1);
}
.product-title {
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: var(--sp-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-color-bar {
  display: flex;
  gap: 3px;
  margin-bottom: 10px;
}
.product-color-swatch {
  width: 40px;
  height: 4px;
  position: relative;
}
.product-color-swatch::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(0,0,0,0.28);
  pointer-events: none;
}
.product-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  flex-wrap: wrap;
}
.product-court {
  font-size: var(--text-xs);
  padding: 1px var(--sp-2);
  background: var(--bg-filter);
  border-radius: 3px;
  color: var(--text-secondary);
  white-space: nowrap;
}
/* ---- String material / feature chips ---- */
.product-string-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: var(--sp-1); /* 4px — meta(8px)+4px=12px で基準に合わせる */
}
.product-string-row + .product-string-row { margin-top: 0.75rem; } /* 素材→特徴 12px */
.product-string-row ~ .product-promo-row  { margin-top: 0.75rem; } /* 特徴→割引/ポイント 12px */
.product-string-chip {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1.5;
  white-space: nowrap;
}
.chip-material { background: #E6EFEA; color: #2A4D35; } /* sage — 素材・構造 */
.chip-feature  { background: #EEECEA; color: #4A4540; } /* warm gray — 特徴・性能 */

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
}
.product-price {
  font-family: var(--font-en);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
}
.product-price-yen {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--text-secondary);
}
.product-code {
  font-family: var(--font-en);
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border);
}
.product-value {
  font-family: var(--font-en);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-decoration: line-through;
}
.product-stock-low {
  font-size: var(--text-xs);
  color: var(--text-price);
  margin-top: var(--sp-1);
}

/* ---- List View Card ---- */
.product-grid.list-view .product-card a {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--sp-6);
}
.product-grid.list-view .product-img-wrap {
  aspect-ratio: 1;
  border-radius: 6px;
}
.product-grid.list-view .product-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--sp-4) var(--sp-4) var(--sp-4) 0;
}

/* ---- No Results ---- */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--sp-16) var(--sp-8);
  color: var(--text-tertiary);
}
.no-results-icon {
  font-size: 48px;
  margin-bottom: var(--sp-4);
  opacity: 0.3;
}
.no-results-text {
  font-size: var(--text-md);
  margin-bottom: var(--sp-2);
}
.no-results-sub {
  font-size: var(--text-sm);
}

/* ---- Animations ---- */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.product-card {
  animation: cardIn 0.3s var(--ease) backwards;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 240px 1fr;
    padding: var(--sp-4);
    gap: var(--sp-6);
  }
}
@media (max-width: 768px) {
  /* Main header mobile */
  .main-header-inner {
    padding: 9px var(--sp-4);
    justify-content: space-between;
  }
  .header-store-name { display: none; }
  .main-nav { display: none; }
  .hamburger-btn { display: block; order: -1; }
  .tj-logo-white {
    display: block;
    height: 28px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .mobile-cart-btn { display: block; }
  .main-header-inner { position: relative; }
  .mobile-menu { padding: var(--sp-4); }

  /* Page header mobile — hide desktop logo */
  .page-header-logo { display: none; }

  .main-container {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: none;
    display: none;
    z-index: 2000;
    background: rgba(0,0,0,0.4);
    padding: 0;
    overflow: hidden;
  }
  .sidebar.mobile-open {
    display: flex;
    justify-content: flex-end;
  }
  .sidebar.mobile-open .mobile-close-filter {
    display: none;
  }
  .sidebar.mobile-open #filterContainer {
    background: var(--bg-card);
    width: 85%;
    max-width: 360px;
    height: 100%;
    overflow-y: auto;
    padding: var(--sp-6) var(--sp-6) 80px;
    animation: slideInRight 0.25s cubic-bezier(0.25,0.46,0.45,0.94);
  }
  .mobile-filter-close-bottom {
    display: block !important;
    position: fixed;
    bottom: 0;
    right: 0;
    width: 85%;
    max-width: 360px;
    z-index: 2001;
    padding: var(--sp-4) var(--sp-6);
    background: var(--accent);
    color: white;
    border: none;
    font-family: var(--font-jp);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    letter-spacing: 0.06em;
  }
  @keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
  }
  .mobile-filter-bar {
    display: flex !important;
    position: sticky;
    top: var(--sticky-header-h, 42px);
    z-index: 800;
    background: var(--bg);
    padding: var(--sp-3) var(--sp-4);
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
  }
  .product-grid.list-view .product-card a {
    grid-template-columns: 120px 1fr;
    gap: var(--sp-3);
  }
  .page-header-inner {
    padding: var(--sp-4);
  }
  .page-title { font-size: var(--text-xl); }
}
@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-2);
  }
  .product-info { padding: var(--sp-3); }
  .product-img-wrap img { padding: var(--sp-2); }
}

/* Mobile filter bar — sits above content, below header */
.mobile-filter-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.mobile-filter-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  font-family: var(--font-jp);
  font-size: var(--text-sm);
  cursor: pointer;
  color: var(--text-primary);
  transition: all var(--duration) var(--ease);
}
.mobile-filter-btn:hover { border-color: var(--border-active); }
.mobile-filter-btn svg { width: 16px; height: 16px; }
.mobile-filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.mobile-filter-count {
  font-family: var(--font-en);
  font-size: var(--text-xs);
  background: var(--text-price);
  color: white;
  border-radius: 10px;
  padding: 0 6px;
  min-width: 18px;
  text-align: center;
  line-height: 18px;
}
.mobile-close-filter {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-family: var(--font-jp);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  margin-bottom: var(--sp-4);
}
.sidebar.mobile-open .mobile-close-filter {
  display: inline-flex;
}
/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  padding: var(--sp-8) var(--sp-8) var(--sp-6);
  margin-top: var(--sp-12);
}
.site-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-en);
  letter-spacing: 0.02em;
}
.site-footer-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.site-footer-contact {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  flex-wrap: wrap;
}
.site-footer-contact a {
  color: var(--text-tertiary);
  text-decoration: none;
}
.site-footer-contact a:hover { color: var(--text-secondary); }
.site-footer-tel { color: var(--text-tertiary); }
.site-footer-tel-note {
  margin-left: var(--sp-1);
  font-size: 10px;
  opacity: 0.6;
}
.site-footer-tel-note::before { content: '('; }
.site-footer-tel-note::after  { content: ')'; }
.site-footer-sns {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.site-footer-sns a {
  color: var(--text-tertiary);
  display: flex;
  transition: color 0.15s;
}
.site-footer-sns a:hover { color: var(--text-secondary); }
.site-footer-sns svg { width: 16px; height: 16px; }
.site-footer-copy { text-align: center; }

/* ---- Cookie Consent ---- */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--accent);
  color: rgba(255,255,255,0.9);
  padding: var(--sp-4) var(--sp-8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  font-size: var(--text-sm);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
}
.cookie-consent.hidden {
  transform: translateY(100%);
  pointer-events: none;
}
.cookie-consent-text {
  flex: 1;
  max-width: 640px;
  line-height: 1.5;
}
.cookie-consent-text a {
  color: white;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-consent-btn {
  background: white;
  color: var(--accent);
  border: none;
  padding: var(--sp-2) var(--sp-6);
  border-radius: 6px;
  font-family: var(--font-jp);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.cookie-consent-btn:hover { opacity: 0.85; }
.cookie-consent-btn-reject {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.3);
  padding: var(--sp-2) var(--sp-5);
  border-radius: 6px;
  font-family: var(--font-jp);
  font-size: var(--text-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.cookie-consent-btn-reject:hover { color: white; border-color: rgba(255,255,255,0.6); }
.cookie-consent-btns { display: flex; gap: var(--sp-3); flex-shrink: 0; }
@media (max-width: 768px) {
  .cookie-consent {
    flex-direction: column;
    gap: var(--sp-3);
    padding: var(--sp-4);
    padding-bottom: calc(var(--sp-4) + max(env(safe-area-inset-bottom, 0px), 60px));
    text-align: center;
  }
  .cookie-consent-btn,
  .cookie-consent-btn-reject {
    padding-top: var(--sp-3);
    padding-bottom: var(--sp-3);
    font-size: var(--text-base);
  }
}

/* ---- Favorite Button on Card ---- */
.product-fav-btn {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: all 0.2s cubic-bezier(0.25,0.46,0.45,0.94);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.product-fav-btn:hover {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transform: scale(1.1);
}
.product-fav-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-tertiary);
  fill: none;
  stroke-width: 2;
  transition: all 0.2s;
}
.product-fav-btn.favorited {
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.product-fav-btn.favorited svg {
  stroke: white;
  fill: none;
}

/* ---- Favorites Page Mode ---- */
.product-card.unavailable {
  opacity: 0.5;
  position: relative;
}
.product-card.unavailable .product-img-wrap::after {
  content: '品切れ中';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.7);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-jp);
}
.fav-remove-btn {
  display: block;
  width: 100%;
  padding: var(--sp-2);
  margin-top: var(--sp-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  background: none;
  color: var(--text-tertiary);
  font-family: var(--font-jp);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all 0.2s;
}
.fav-remove-btn:hover {
  background: var(--text-price);
  color: white;
  border-color: var(--text-price);
}

/* ---- Gender tag in product card ---- */
.product-gen-row {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-2);
}
.product-gen {
  font-size: 10px;
  padding: 1px var(--sp-2);
  background: #F3F0FF;
  color: #534AB7;
  border-radius: 3px;
  font-weight: 500;
  white-space: nowrap;
}

/* ---- Compare Button (on card) ---- */
.product-cmp-btn {
  position: absolute;
  bottom: var(--sp-3);
  right: var(--sp-3);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: all 0.2s cubic-bezier(0.25,0.46,0.45,0.94);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.product-cmp-btn:hover { background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.12); transform: scale(1.1); }
.product-cmp-btn svg { width: 15px; height: 15px; stroke: var(--text-tertiary); fill: none; stroke-width: 2; transition: all 0.2s; }
.product-cmp-btn.active { background: var(--accent); }
.product-cmp-btn.active svg { stroke: white; }
.product-cmp-btn.cmp-disabled { opacity: 0.3; pointer-events: none; }

/* ---- Compare Bar (fixed bottom) ---- */
.compare-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 6000;
  background: var(--bg-card);
  border-top: 2px solid var(--accent);
  padding: var(--sp-3) var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
}
.compare-bar.visible { transform: translateY(0); }
.compare-bar-items { display: flex; gap: var(--sp-3); flex: 1; align-items: center; }
.compare-bar-slot {
  width: 44px; height: 44px;
  border: 1.5px dashed var(--border);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
  font-size: 20px;
  flex-shrink: 0;
}
.compare-bar-item { position: relative; width: 44px; height: 44px; flex-shrink: 0; }
.compare-bar-item img { width: 100%; height: 100%; object-fit: contain; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-card); }
.compare-bar-remove {
  position: absolute; top: -5px; right: -5px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-primary); color: white;
  border: none; font-size: 9px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.compare-bar-label { font-size: var(--text-xs); color: var(--text-tertiary); white-space: nowrap; }
.compare-bar-btn {
  padding: var(--sp-2) var(--sp-6);
  background: var(--accent); color: white;
  border: none; border-radius: 6px;
  font-size: var(--text-sm); font-weight: 600;
  cursor: pointer; white-space: nowrap;
  font-family: var(--font-jp);
  transition: opacity 0.2s;
}
.compare-bar-btn:disabled { opacity: 0.35; cursor: default; }
.compare-bar-clear {
  padding: var(--sp-2) var(--sp-3);
  background: none; border: 1px solid var(--border);
  border-radius: 6px; font-size: var(--text-xs);
  cursor: pointer; color: var(--text-tertiary);
  font-family: var(--font-jp); white-space: nowrap;
}
@media(max-width:768px){
  .compare-bar { padding: var(--sp-3) var(--sp-4); gap: var(--sp-3); }
  .compare-bar-label { display: none; }
}

/* ---- Compare Popup ---- */
.compare-popup {
  display: none;
  position: fixed; inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.5);
  align-items: flex-end;
  justify-content: center;
}
.compare-popup.open { display: flex; }
.compare-popup-card {
  background: var(--bg-card);
  width: 100%; max-width: 860px;
  max-height: 88vh;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.compare-popup-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.compare-popup-title { font-weight: 700; font-size: var(--text-base); }
.compare-popup-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-tertiary);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background 0.15s;
}
.compare-popup-close:hover { background: var(--bg-filter); }
.compare-popup-close svg { width: 18px; height: 18px; }
.compare-popup-body { overflow-y: auto; flex: 1; padding: 0 var(--sp-6) var(--sp-8); }
.compare-grid { display: grid; }
/* col-head: product card at top */
.compare-col-head {
  padding: var(--sp-4) var(--sp-2);
  border-bottom: 2px solid var(--border);
  display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-2); text-align: center;
}
.compare-img { width: 100%; max-width: 120px; aspect-ratio: 1; margin: 0 auto; }
.compare-img img { width: 100%; height: 100%; object-fit: contain; }
.compare-head-maker { font-size: 10px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; }
.compare-head-title { font-size: var(--text-xs); line-height: 1.5; color: var(--text-secondary); }
.compare-head-value { font-family: var(--font-en); font-size: 10px; color: var(--text-tertiary); text-decoration: line-through; margin-bottom: 2px; }
.compare-head-price { font-family: var(--font-en); font-size: var(--text-md); font-weight: 700; }
.compare-head-price small { font-size: 10px; font-weight: 400; color: var(--text-tertiary); margin-left: 2px; }
.compare-head-promo { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
.compare-head-badge { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 3px; line-height: 1.4; font-family: var(--font-en); }
.compare-head-badge.badge-disco { background: #FFF0ED; color: var(--text-price); }
.compare-head-badge.badge-point { background: #E3F2FD; color: #1565C0; font-weight: 500; }
.compare-head-badge.badge-gen { background: #F3F0FF; color: #534AB7; font-family: var(--font-jp); font-weight: 500; }
/* label column */
.compare-label {
  display: flex; align-items: center;
  font-size: 10px; font-weight: 600;
  color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em;
  padding: var(--sp-3) var(--sp-2) var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}
.compare-label:first-child { border-bottom: 2px solid var(--border); }
/* value cells */
.compare-val {
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-3) var(--sp-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-en); font-size: var(--text-sm); font-weight: 600;
  text-align: center;
}
.compare-val small { font-size: 9px; font-weight: 400; color: var(--text-tertiary); margin-left: 2px; }
.compare-val-empty { color: var(--border); font-weight: 400; }
.compare-val.highlight { background: #FFFDE7; }
@media(max-width:768px){
  .compare-popup-body { padding: 0 var(--sp-3) var(--sp-6); }
  .compare-popup-header { padding: var(--sp-3) var(--sp-4); }
}

/* ---- Racket Spec Row ---- */
.product-spec-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-bottom: var(--sp-2);
}
.product-spec-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 2px 3px;
  background: var(--bg-filter);
  border-radius: 4px;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.2;
}
.product-spec-item span {
  font-size: 13px;
}
.product-spec-item svg {
  width: 11px;
  height: 11px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.product-spec-item small {
  font-size: 9px;
  font-weight: 400;
  color: var(--text-tertiary);
  line-height: 1;
}
.product-spec-item.spec-empty {
  opacity: 0.35;
}

/* ---- Sticky Header on Scroll ---- */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
  background: var(--bg-card);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.sticky-header.visible { transform: translateY(0); }
.sticky-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-8);
}
.sticky-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}
.sticky-search input {
  width: 100%;
  padding: var(--sp-2) var(--sp-8) var(--sp-2) var(--sp-8);
  font-family: var(--font-jp);
  font-size: var(--text-xs);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-filter);
  outline: none;
}
.sticky-search input:focus { border-color: var(--accent); }
.sticky-search svg {
  position: absolute;
  left: var(--sp-2);
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
  pointer-events: none;
}
.sticky-sort {
  font-family: var(--font-jp);
  font-size: var(--text-xs);
  padding: var(--sp-2) var(--sp-6) var(--sp-2) var(--sp-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%236B6860' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.sticky-nav-btns {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  margin-left: auto;
}
.sticky-nav-btn {
  padding: var(--sp-1) var(--sp-3);
  border: none;
  background: none;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  cursor: pointer;
  font-family: var(--font-jp);
  border-radius: 4px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}
.sticky-nav-btn:hover { background: var(--bg-filter); color: var(--text-primary); }
.sticky-nav-btn svg { width: 14px; height: 14px; }
@media(max-width:768px){
  .sticky-header-inner { padding: var(--sp-2) var(--sp-4); }
  .sticky-sort { display: none; }
}

/* ---- Emergency Ticker ---- */
.emergency-ticker {
  display: none;
  background: #434343;
  border-bottom: 1px solid #555555;
  overflow: hidden;
  position: relative;
  height: 36px;
  line-height: 36px;
  cursor: pointer;
}
.emergency-ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: tickerScroll 30s linear infinite;
  font-size: var(--text-xs);
  color: #cccccc;
  font-weight: 500;
}
.emergency-ticker-item {
  padding: 0 var(--sp-4);
  transition: color 0.15s;
}
.emergency-ticker-item:hover { color: #ffffff; text-decoration: underline; }
.emergency-ticker-sep {
  color: #666666;
  padding: 0 var(--sp-2);
}
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- Emergency Popup ---- */
.emergency-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0,0,0,0.4);
  align-items: center;
  justify-content: center;
}
.emergency-popup.open { display: flex; }
.emergency-popup-card {
  background: var(--bg-card);
  border-radius: 12px;
  max-width: 560px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: var(--sp-8);
  position: relative;
}
.emergency-popup-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  padding: var(--sp-2);
  border-radius: 50%;
  transition: all 0.15s;
}
.emergency-popup-close:hover { background: var(--bg-filter); color: var(--text-primary); }
.emergency-popup-close svg { width: 20px; height: 20px; }
.emergency-popup-item {
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--border);
}
.emergency-popup-item:last-child { border-bottom: none; }
.emergency-popup-item.highlighted { background: var(--bg-filter); margin: 0 calc(var(--sp-4) * -1); padding: var(--sp-4); border-radius: 8px; }
.emergency-popup-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.emergency-popup-details {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ---- Browsing History Section ---- */
.search-empty-state {
  display: none;
  text-align: center;
  padding: 80px var(--sp-4) 60px;
  color: var(--text-muted);
}
.search-empty-icon {
  margin-bottom: var(--sp-4);
  opacity: 0.35;
}
.search-empty-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0 0 var(--sp-2);
  color: var(--text-sub);
}
.search-empty-sub {
  font-size: var(--text-sm);
  margin: 0;
}
.history-section {
  display: none;
  background: var(--bg-filter);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-4) 0;
}
.history-section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-8);
}
.history-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}
.history-section-title {
  font-family: var(--font-en);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.history-clear-btn {
  font-size: 11px;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-jp);
  padding: var(--sp-1) var(--sp-2);
  border-radius: 4px;
  transition: all 0.15s;
}
.history-clear-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.history-grid {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-1);
}
.history-grid::-webkit-scrollbar { display: none; }
.history-item-wrap {
  position: relative;
  flex-shrink: 0;
  width: 100px;
}
.history-item {
  display: block;
  width: 100%;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.15s;
}
.history-item:hover { transform: translateY(-2px); }
.history-clip-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  transition: background 0.2s;
}
.history-clip-btn svg { width: 11px; height: 11px; stroke: #1A1A1A; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.history-clip-btn.favorited { background: #1A1A1A; }
.history-clip-btn.favorited svg { stroke: #fff; }
.history-item img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  background: var(--bg-card);
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-bottom: var(--sp-1);
}
.history-item-info {
  display: flex;
  flex-direction: column;
}
.history-item-maker {
  font-size: 9px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.history-item-price {
  font-size: 11px;
  font-weight: 600;
}
@media(max-width:768px){
  .history-section-inner { padding: 0 var(--sp-4); }
  .history-item-wrap { width: 80px; }
  .history-item img { width: 80px; height: 80px; }
}

/* ---- Clip New Animation ---- */
@keyframes clipIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.product-card.clip-new {
  animation: clipIn 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) both !important;
}

/* ---- Clip Toast ---- */
.clip-toast {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--accent);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: var(--text-sm);
  font-family: var(--font-jp);
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999;
  white-space: nowrap;
}
.clip-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Recommendation Section ---- */
.rec-section {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: var(--sp-6) 0;
}
.rec-section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-8);
}
.rec-section-header {
  margin-bottom: var(--sp-4);
}
.rec-section-title {
  font-family: var(--font-en);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}
.rec-section-title-jp {
  font-family: var(--font-jp);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-left: var(--sp-3);
  text-transform: none;
}
.rec-grid {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-2);
}
.rec-grid::-webkit-scrollbar { display: none; }
.rec-item {
  flex-shrink: 0;
  width: 160px;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.15s;
}
.rec-item:hover { transform: translateY(-2px); }
.rec-img {
  width: 160px;
  height: 160px;
  background: var(--bg-filter);
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: var(--sp-2);
  position: relative;
}
.rec-clip-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.88);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: all 0.15s;
  z-index: 1;
}
.rec-clip-btn:hover { background: white; color: var(--text-primary); }
.rec-clip-btn.favorited { background: var(--accent); color: white; }
.rec-clip-btn svg { width: 13px; height: 13px; }
.rec-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--sp-2);
}
.rec-maker {
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.rec-title {
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--sp-1);
}
.rec-price {
  font-family: var(--font-en);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}
.rec-price small {
  font-family: var(--font-jp);
  font-size: 10px;
  font-weight: 400;
  color: var(--text-tertiary);
  margin-left: 2px;
}
@media(max-width:768px){
  .rec-section-inner { padding: 0 var(--sp-4); }
  .rec-item { width: 130px; }
  .rec-img { width: 130px; height: 130px; }
}

/* Mobile filter close bottom button — hidden on PC */
.mobile-filter-close-bottom {
  display: none;
}

/* ========================================
   List pages: Quick Nav + Popup + Cards
   ======================================== */
.quick-nav{display:flex;justify-content:center;gap:var(--sp-3);padding:var(--sp-6) var(--sp-8);flex-wrap:wrap;}
.quick-nav-btn{padding:var(--sp-3) var(--sp-8);background:var(--bg-card);border:1px solid var(--border);border-radius:8px;font-family:var(--font-jp);font-size:var(--text-sm);font-weight:500;color:var(--text-primary);cursor:pointer;transition:all 0.2s;display:flex;align-items:center;gap:var(--sp-2);}
.quick-nav-btn:hover{border-color:var(--border-active);background:var(--bg-hover);}
.quick-nav-btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;}
.nav-popup-overlay{display:none;position:fixed;inset:0;z-index:3000;background:rgba(0,0,0,0.4);}
.nav-popup-overlay.open{display:flex;align-items:center;justify-content:center;}
.nav-popup{background:var(--bg-card);border-radius:12px;max-width:640px;width:92%;max-height:80vh;overflow-y:auto;padding:var(--sp-8);}
.nav-popup-title{font-family:var(--font-en);font-size:var(--text-lg);font-weight:700;margin-bottom:var(--sp-6);display:flex;align-items:center;justify-content:space-between;}
.nav-popup-close{background:none;border:none;cursor:pointer;color:var(--text-tertiary);padding:var(--sp-2);}
.nav-popup-close svg{width:20px;height:20px;}
.nav-popup-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--sp-2);}
.nav-popup-item{display:flex;align-items:center;gap:var(--sp-2);padding:var(--sp-3) var(--sp-4);border-radius:6px;font-size:var(--text-sm);color:var(--text-primary);text-decoration:none;transition:background 0.15s;}
.nav-popup-item:hover{background:var(--bg-hover);}
.nav-popup-item-count{font-size:var(--text-xs);color:var(--text-tertiary);margin-left:auto;}
.list-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:16px;padding:24px 32px;max-width:1400px;margin:0 auto;}
.list-grid .top-card{text-decoration:none;color:var(--text-primary);transition:transform 0.2s;}
.list-grid .top-card:hover{transform:translateY(-4px);}
.list-grid .top-card-img{width:100%;aspect-ratio:1;border-radius:8px;overflow:hidden;background:var(--bg-card);border:1px solid var(--border);margin-bottom:var(--sp-2);position:relative;}
.list-grid .top-card-img img{width:100%;height:100%;object-fit:contain;padding:var(--sp-3);transition:transform 0.3s;}
.list-grid .top-card:hover .top-card-img img{transform:scale(1.05);}
.top-card-img .product-badge{position:absolute;top:var(--sp-2);left:var(--sp-2);z-index:2;}
.top-card-meta{display:flex;align-items:center;gap:var(--sp-2);margin-bottom:2px;flex-wrap:wrap;}
.top-card-meta .product-court{font-size:10px;padding:1px 6px;background:var(--accent-tag);border-radius:3px;color:var(--text-secondary);}
.top-card-meta .top-card-date{font-size:10px;color:var(--text-tertiary);}
.top-card-maker{font-size:10px;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:0.04em;}
.top-card-title{font-size:var(--text-xs);line-height:1.5;color:var(--text-secondary);margin-top:1px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
@media(max-width:600px){.nav-popup-grid{grid-template-columns:repeat(2,1fr);}.nav-popup{padding:var(--sp-4);}}
@media(max-width:768px){.quick-nav{padding:var(--sp-4);gap:var(--sp-2);}.quick-nav-btn{padding:var(--sp-2) var(--sp-5);font-size:var(--text-xs);}.list-grid{padding:var(--sp-4);gap:var(--sp-3);grid-template-columns:repeat(2,1fr);}}

/* ---- foryou grid (detail-similar-grid 相当) ---- */
.foryou-wrap{max-width:var(--max-w);margin:0 auto;padding:var(--sp-6) var(--sp-6) var(--sp-10);}
.foryou-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:var(--sp-4);}
@media(max-width:1200px){.foryou-grid{grid-template-columns:repeat(4,1fr);}}
@media(max-width:768px){.foryou-wrap{padding:var(--sp-4);}.foryou-grid{grid-template-columns:repeat(2,1fr);gap:var(--sp-3);}}
