/* ================================================
   リセット & ベーススタイル
   ================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: #e8e8e8;
  color: #333;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app-wrapper {
  max-width: 480px;
  margin: 0 auto;
  background-color: #FFFFFF;
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.container {
  padding: 0 16px;
}

/* ================================================
   Header（追従なし）
   ================================================ */
.header {
  background-color: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  padding: 12px 0;
}

.header-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo img {
  height: 24px;
  display: block;
}

/* ================================================
   Hero Section
   ================================================ */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #F3F4F6;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ================================================
   Sticky Navigation（ナビゲーションのみ追従）
   ================================================ */
.sticky-nav {
  position: sticky;
  top: 0;
  background-color: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  z-index: 90;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px;
}

.nav-btn {
  flex: 1;
  padding: 8px 12px;
  background-color: white;
  border: 1px solid #D1D5DB;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Noto Sans JP', sans-serif;
  white-space: nowrap;
}

.nav-btn:hover {
  border-color: #5C1D0E;
}

.nav-btn.active {
  background-color: #5C1D0E;
  border-color: #5C1D0E;
  color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ================================================
   Pickup Section (Carousel)
   ================================================ */
.section-pickup {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding-bottom: 40px;
  background-color: #F99190;
}

.must-go-text {
  position: absolute;
  top: -25px;
  left: -5px;
  font-size: min(27vw, 130px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.12em;
  white-space: nowrap;
  font-family: system-ui, -apple-system, sans-serif;
  opacity: 0.15;
  z-index: 1;
  pointer-events: none;
  color: #FFFFFF;
}

.pickup-header {
  position: relative;
  z-index: 10;
  margin-bottom: 24px;
  padding: 60px 16px 0 16px;
}

.pickup-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  color: #FFFFFF;
}

.pickup-subtitle {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  color: #FFFFFF;
  opacity: 0.9;
}

.carousel-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 20px;
  scroll-padding-right: 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-scroll::-webkit-scrollbar {
  display: none;
}

.carousel-container {
  display: flex;
  gap: 12px;
  padding-bottom: 8px;
  padding-left: 20px;
  padding-right: 20px;
}

.pickup-card {
  flex-shrink: 0;
  width: 100%;
  background: white;
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform 0.2s;
}

.pickup-card:active {
  transform: scale(0.98);
}

.pickup-card-image {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.pickup-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.pickup-card-content {
  padding: 12px;
}

/* ================================================
   Catalog Section (Grid)
   ================================================ */
.section-catalog {
  padding: 32px 0;
  background-color: #F9FAFB;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  color: #333;
}

.section-desc {
  font-size: 14px;
  color: #4B5563;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Filter Bar */
.filter-bar {
  margin-bottom: 16px;
  position: relative;
}

.filter-bar::before,
.filter-bar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 8px;
  width: 20px;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.2s;
}

.filter-bar::before {
  left: 0;
  background: linear-gradient(to right, #F9FAFB, transparent);
}

.filter-bar::after {
  right: 0;
  background: linear-gradient(to left, #F9FAFB, transparent);
}

/* 左端にいる時は左のグラデーションを非表示 */
.filter-bar.at-start::before {
  opacity: 0;
}

/* 右端にいる時は右のグラデーションを非表示 */
.filter-bar.at-end::after {
  opacity: 0;
}

.filter-scroll {
  display: flex;
  gap: 8px;
  padding-bottom: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  background-color: white;
  border: 1px solid #D1D5DB;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Noto Sans JP', sans-serif;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: #5C1D0E;
}

.filter-btn.active {
  background-color: #5C1D0E;
  border-color: #5C1D0E;
  color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Product Grid - 2カラム */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.product-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #F3F4F6;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: #6B7280;
  font-size: 13px;
}

/* ================================================
   New Arrivals Section (List)
   ================================================ */
.section-new {
  padding: 32px 0;
  background-color: #FFFFFF;
}

.new-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.new-item {
  display: flex;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s;
  cursor: pointer;
}

.new-item:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.new-item-image {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  overflow: hidden;
  background-color: #F3F4F6;
}

.new-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.new-item-content {
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

/* ================================================
   Campaigns Section
   ================================================ */
.section-campaigns {
  padding: 32px 0;
  background-color: #F9FAFB;
}

.campaign-banners {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.campaign-banner {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: box-shadow 0.2s;
  aspect-ratio: 3 / 1;
  display: block;
}

.campaign-banner:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.campaign-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================================================
   Footer
   ================================================ */
.footer {
  background-color: #F9FAFB;
  border-top: 1px solid #E5E7EB;
  padding: 32px 0;
  text-align: center;
}

.footer-content {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

.footer-content p {
  font-size: 13px;
  color: #4B5563;
}

/* ================================================
   Utility Classes
   ================================================ */
.hide-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ================================================
   Loading & Error States
   ================================================ */
.loading-container,
.error-container {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
}

.loading-content,
.error-content {
  text-align: center;
}

.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 4px solid #F44336;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 14px;
  color: #6B7280;
}

.error-text {
  font-size: 14px;
  color: #DC2626;
  margin-bottom: 16px;
}

.retry-button {
  padding: 8px 16px;
  background-color: #00A5BB;
  color: white;
  border: none;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: 'Noto Sans JP', sans-serif;
}

.retry-button:hover {
  background-color: #008FA3;
}
