/* MINETEMU メインスタイルシート (TEMU風デザインシステム) */
:root {
  --primary-orange: #fb5700;
  --primary-orange-hover: #e04b00;
  --accent-yellow: #ffd600;
  --badge-red: #e52e2e;
  --bg-main: #f6f6f6;
  --bg-card: #ffffff;
  --text-dark: #222222;
  --text-muted: #777777;
  --border-light: #eeeeee;
  --border-radius: 12px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.1);
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.18);
  --font-family: 'Poppins', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* トップアナウンスバー (TEMU名物) */
.top-announcement-bar {
  background: #111111;
  color: #ffffff;
  font-size: 12px;
  padding: 6px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}

.announcement-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.announcement-badge {
  background: var(--primary-orange);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 11px;
}

.announcement-right {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #aaa;
}

.announcement-right a {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.announcement-right a:hover {
  color: var(--accent-yellow);
}

/* メインヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 2px solid var(--primary-orange);
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-temu-box {
  background: var(--primary-orange);
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 8px;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.logo-subtext {
  font-size: 11px;
  color: #666;
  font-weight: 600;
  line-height: 1.2;
}

.logo-subtext .slogan {
  color: var(--primary-orange);
  font-weight: 800;
}

/* 検索バー */
.header-search {
  flex: 1;
  max-width: 600px;
  position: relative;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: #f1f1f1;
  border: 2px solid var(--primary-orange);
  border-radius: 30px;
  overflow: hidden;
  transition: all 0.2s;
}

.search-input-wrapper:focus-within {
  box-shadow: 0 0 0 3px rgba(251, 87, 0, 0.2);
  background: #fff;
}

.search-icon-left {
  padding-left: 16px;
  color: #888;
}

.header-search input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
}

.search-btn {
  background: var(--primary-orange);
  color: #fff;
  border: none;
  padding: 10px 22px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s;
}

.search-btn:hover {
  background: var(--primary-orange-hover);
}

/* ヘッダー右側アクション */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.header-action-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  color: var(--text-dark);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  position: relative;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.header-action-item:hover {
  background: #f5f5f5;
  color: var(--primary-orange);
}

.header-action-item i {
  font-size: 20px;
  margin-bottom: 2px;
}

.cart-count-badge {
  position: absolute;
  top: -4px;
  right: 6px;
  background: var(--badge-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* クーポンリボン */
.coupon-ribbon {
  background: linear-gradient(90deg, #ff5000, #ff8c00);
  color: #ffffff;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.spin-link-btn {
  background: var(--accent-yellow);
  color: #222;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}

.spin-link-btn:hover {
  transform: scale(1.05);
}

/* ヒーロー＆フラッシュセールバナー */
.hero-flash-section {
  background: linear-gradient(135deg, #2b1102 0%, #4a1900 100%);
  color: #fff;
  padding: 24px 16px;
  border-bottom: 4px solid var(--primary-orange);
}

.hero-flash-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.flash-title-group h2 {
  font-size: 24px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.flash-title-group p {
  font-size: 13px;
  color: #ffd0b3;
  margin-top: 4px;
}

.flash-timer-box {
  background: rgba(0, 0, 0, 0.4);
  padding: 10px 20px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
}

.timer-label {
  font-size: 12px;
  color: #ffaa77;
  font-weight: 700;
}

.countdown-timer-val {
  font-size: 20px;
  font-weight: 900;
  background: #000;
  padding: 2px 10px;
  border-radius: 6px;
  color: var(--accent-yellow);
  letter-spacing: 2px;
}

/* カテゴリタブバー */
.category-nav-bar {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  padding: 10px 16px;
}

.category-tabs-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-tabs-container::-webkit-scrollbar {
  display: none;
}

.cat-tab {
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  padding: 8px 18px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #444;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.cat-tab:hover {
  background: #eee;
  color: #000;
}

.cat-tab.active {
  background: var(--primary-orange);
  color: #fff;
  border-color: var(--primary-orange);
  box-shadow: 0 2px 8px rgba(251, 87, 0, 0.3);
}

/* メインコンテンツ */
.main-layout {
  max-width: 1280px;
  margin: 20px auto;
  padding: 0 16px 60px;
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.catalog-title {
  font-size: 18px;
  font-weight: 800;
  color: #222;
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* 商品グリッド */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* 商品カード */
.product-card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-orange);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f9f9f9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transition: transform 0.25s ease;
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

.product-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e2430;
  color: var(--primary-orange);
  font-size: 48px;
}

.cart-item-img .product-placeholder {
  font-size: 24px;
}

.modal-img-container .product-placeholder {
  font-size: 64px;
}

/* TEMUバッジ */
.temu-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.badge-hot {
  background: var(--badge-red);
}

.badge-sale {
  background: var(--primary-orange);
}

.badge-warn {
  background: #f57c00;
}

.discount-pill {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--accent-yellow);
  color: #000;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

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

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  line-height: 1.4;
  height: 2.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 8px;
}

.card-sales-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 4px;
}

.sold-text {
  color: #666;
}

.stock-text {
  color: var(--badge-red);
  font-weight: 700;
}

/* 進捗バー */
.sales-progress-bar {
  width: 100%;
  height: 6px;
  background: #f1f1f1;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.sales-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff8c00, #ff0044);
  border-radius: 3px;
}

/* 価格表示 */
.card-price-row {
  display: flex;
  align-items: baseline;
  margin-bottom: 8px;
}

.price-group {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.price-group .currency {
  font-size: 14px;
  font-weight: 900;
  color: var(--primary-orange);
}

.price-group .main-price {
  font-size: 26px;
  font-weight: 900;
  color: var(--primary-orange);
  line-height: 1;
}

.price-group .orig-price {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
  margin-left: 6px;
}

.card-footer-tags {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-bottom: 12px;
  color: #555;
}

.tag-free {
  color: #2e7d32;
  font-weight: 700;
}

.tag-rating {
  color: #ff9800;
  font-weight: 700;
}

.card-btn-row {
  margin-top: auto;
}

.add-to-cart-btn {
  width: 100%;
  background: #fff0ea;
  color: var(--primary-orange);
  border: 1px solid var(--primary-orange);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: inherit;
}

.add-to-cart-btn:hover {
  background: var(--primary-orange);
  color: #fff;
}

/* 空状態 */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #777;
}

.no-results i {
  font-size: 48px;
  color: #ccc;
  margin-bottom: 16px;
}

/* モーダル基本スタイル */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #fff;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f1f1f1;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #555;
  transition: background 0.2s;
}

.modal-close-btn:hover {
  background: #ddd;
}

/* 商品詳細モーダル */
.detail-modal-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-top-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
}

@media (max-width: 500px) {
  .detail-top-row {
    grid-template-columns: 1fr;
  }
}

.modal-img-container {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-price-box {
  background: #fff7f2;
  border: 1px solid #ffd8c4;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.modal-now-price {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary-orange);
}

.modal-orig-price {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
}

.modal-badge-100 {
  background: var(--badge-red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.detail-tag {
  background: #f0f0f0;
  font-size: 11px;
  color: #555;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.detail-file-specs {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed #eee;
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-label {
  color: #777;
}

.spec-val {
  font-weight: 700;
  color: #333;
}

.modal-desc {
  font-size: 13px;
  color: #444;
  line-height: 1.6;
}

/* レビュー一覧 */
.modal-reviews-section {
  border-top: 1px solid #eee;
  padding-top: 16px;
}

.modal-reviews-section h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.modal-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 150px;
  overflow-y: auto;
}

.review-item {
  background: #fdfdfd;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.review-user {
  font-weight: 700;
  color: #333;
}

.review-stars {
  color: #ff9800;
  font-size: 11px;
}

.review-date {
  color: #999;
  font-size: 10px;
  margin-left: auto;
}

.review-content {
  color: #555;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 12px;
  margin-top: 12px;
}

.btn-secondary {
  background: #fff0ea;
  color: var(--primary-orange);
  border: 2px solid var(--primary-orange);
  border-radius: 30px;
  padding: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #ffe2d4;
}

.btn-primary {
  background: linear-gradient(90deg, #ff5000, #ff2a00);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 12px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(255, 80, 0, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 80, 0, 0.5);
}

/* カートドロワー */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: #fff;
  z-index: 1200;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.cart-drawer.active {
  transform: translateX(0);
}

.cart-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-drawer-header h3 {
  font-size: 18px;
  font-weight: 800;
}

.cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #888;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cart-empty-state i {
  font-size: 48px;
  color: #ddd;
}

/* カート内アイテムカード */
.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #fdfdfd;
  border: 1px solid #eee;
  border-radius: 10px;
}

.cart-item-img {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
}

.cart-item-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.cart-item-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.cart-current-price {
  font-size: 16px;
  font-weight: 900;
  color: var(--primary-orange);
}

.cart-original-price {
  font-size: 11px;
  color: #999;
  text-decoration: line-through;
}

.cart-discount-tag {
  font-size: 10px;
  background: var(--badge-red);
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
}

.cart-item-file-info {
  font-size: 11px;
  color: #666;
  margin-bottom: 8px;
}

.cart-item-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.qty-btn {
  background: #f5f5f5;
  border: none;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}

.qty-num {
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.cart-remove-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 14px;
  transition: color 0.2s;
}

.cart-remove-btn:hover {
  color: var(--badge-red);
}

/* カートフッター */
.cart-drawer-footer {
  border-top: 1px solid #eee;
  padding: 16px 20px;
  background: #fafafa;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
  color: #555;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 16px;
  font-weight: 800;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #ddd;
}

.cart-total-price {
  font-size: 26px;
  font-weight: 900;
  color: var(--primary-orange);
}

.savings-notice {
  font-size: 12px;
  color: #2e7d32;
  font-weight: 700;
  text-align: right;
  margin-bottom: 12px;
}

.checkout-btn {
  width: 100%;
  background: linear-gradient(90deg, #ff5000, #ff2200);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 80, 0, 0.4);
  transition: all 0.2s;
  font-family: inherit;
}

.checkout-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}

/* チェックアウト完了モーダル */
.success-modal-content {
  text-align: center;
  padding: 16px 0;
}

.success-icon {
  font-size: 56px;
  color: #2e7d32;
  margin-bottom: 12px;
}

.success-title {
  font-size: 22px;
  font-weight: 900;
  color: #222;
  margin-bottom: 8px;
}

.success-desc {
  font-size: 13px;
  color: #666;
  margin-bottom: 20px;
}

.download-links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  margin-bottom: 20px;
}

.download-link-row {
  background: #f7f9fa;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dl-name {
  font-weight: 700;
  font-size: 13px;
  display: block;
}

.dl-size {
  font-size: 11px;
  color: #888;
}

.dl-manual-btn {
  background: var(--primary-orange);
  color: #fff;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.dl-manual-btn:hover {
  background: var(--primary-orange-hover);
}

/* ルーレットモーダル */
.roulette-modal-box {
  max-width: 480px;
  text-align: center;
  background: radial-gradient(circle, #2c1200 0%, #150800 100%);
  color: #fff;
  border: 3px solid #ffaa00;
}

.roulette-modal-box .modal-close-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.roulette-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--accent-yellow);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  margin-bottom: 4px;
}

.roulette-subtitle {
  font-size: 12px;
  color: #ffccaa;
  margin-bottom: 20px;
}

.wheel-outer-wrapper {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto 24px;
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 24px solid #ff0044;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid #ffaa00;
  box-shadow: 0 0 20px rgba(255, 170, 0, 0.5);
}

.spin-action-btn {
  background: linear-gradient(90deg, #ff0055, #ff5500);
  color: #fff;
  border: 2px solid var(--accent-yellow);
  border-radius: 30px;
  padding: 14px 40px;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 0, 85, 0.5);
  transition: transform 0.15s;
  font-family: inherit;
}

.spin-action-btn:hover {
  transform: scale(1.05);
}

.roulette-win-card {
  background: rgba(255,255,255,0.08);
  border: 2px solid var(--accent-yellow);
  border-radius: 16px;
  padding: 20px;
  margin-top: 10px;
}

.win-crown {
  font-size: 40px;
}

.win-title {
  color: var(--accent-yellow);
  font-size: 20px;
  font-weight: 900;
  margin: 8px 0;
}

.win-subtitle {
  font-size: 13px;
  color: #fff;
  margin-bottom: 16px;
}

.coupon-ticket {
  background: #fff;
  color: #222;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.ticket-code {
  font-size: 14px;
  color: var(--primary-orange);
}

.ticket-status {
  font-size: 11px;
  color: #2e7d32;
  font-weight: 700;
}

.win-claim-btn {
  background: var(--accent-yellow);
  color: #222;
  border: none;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 214, 0, 0.4);
}

/* トースト通知 */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(17, 17, 17, 0.9);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-msg.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 画面左下TEMUリアルタイムアクティビティ通知 */
.live-activity-box {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #ffffff;
  border: 1px solid #eee;
  box-shadow: var(--shadow-md);
  border-radius: 30px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  z-index: 90;
  transform: translateY(120px);
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
  max-width: 320px;
}

.live-activity-box.active {
  transform: translateY(0);
  opacity: 1;
}

.live-avatar {
  width: 28px;
  height: 28px;
  background: #ffebd8;
  color: var(--primary-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* フッター */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 40px 16px 20px;
  color: #666;
  font-size: 12px;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eee;
  margin-bottom: 24px;
}

.feature-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-icon {
  font-size: 28px;
  color: var(--primary-orange);
}

.feature-title {
  font-size: 14px;
  font-weight: 800;
  color: #222;
}

.feature-desc {
  font-size: 11px;
  color: #888;
}

.footer-copyright {
  text-align: center;
  color: #999;
}

.footer-copyright a {
  color: var(--primary-orange);
  text-decoration: none;
}

/* ===================================================
   モバイル・タブレット レスポンシブ最適化 (TEMU風)
   =================================================== */

/* モバイル用ボトムナビゲーションバー（PCでは非表示） */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
  z-index: 999;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
}

.mobile-nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  width: 20%;
  height: 100%;
  font-family: inherit;
  transition: color 0.15s;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item i {
  font-size: 18px;
  margin-bottom: 2px;
}

.mobile-nav-item:active {
  color: var(--primary-orange);
}

.mobile-nav-spin-bubble {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #ff0055, #ff5500);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -12px;
  box-shadow: 0 2px 8px rgba(255, 0, 85, 0.4);
  border: 2px solid #fff;
  animation: pulseGlow 1.8s infinite;
}

.mobile-nav-spin-bubble i {
  font-size: 15px;
  margin-bottom: 0;
}

.mobile-nav-cart-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-cart-wrapper .cart-count-badge {
  position: absolute;
  top: -8px;
  right: -10px;
}

/* 画面幅 768px 以下 (スマホ・小型タブレット) */
@media (max-width: 768px) {
  body {
    padding-bottom: 64px; /* ボトムナビ用の余白 */
  }

  .mobile-bottom-nav {
    display: flex;
  }

  /* トップバー */
  .top-announcement-bar {
    font-size: 11px;
    padding: 6px 10px;
    justify-content: center;
  }
  .announcement-right {
    display: none; /* スマホではスッキリ1行にする */
  }

  /* ヘッダー */
  .header-container {
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 12px;
  }

  .brand-logo {
    order: 1;
  }

  .logo-temu-box {
    font-size: 16px;
    padding: 3px 8px;
  }

  .logo-subtext {
    font-size: 10px;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
    gap: 8px;
  }

  .header-search {
    order: 3;
    max-width: 100%;
    width: 100%;
    margin-top: 2px;
  }

  .search-input-wrapper input {
    padding: 8px 12px;
    font-size: 13px;
  }

  .search-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  /* ヒーローフラッシュセール */
  .hero-flash-section {
    padding: 14px 12px;
  }

  .flash-title-group h2 {
    font-size: 18px;
  }

  .flash-title-group p {
    font-size: 11px;
  }

  .flash-timer-box {
    width: 100%;
    justify-content: space-between;
    padding: 6px 14px;
  }

  .countdown-timer-val {
    font-size: 16px;
    padding: 2px 6px;
  }

  /* カテゴリバー */
  .category-nav-bar {
    padding: 8px 12px;
  }

  .cat-tab {
    padding: 6px 14px;
    font-size: 12px;
  }

  /* メインレイアウト */
  .main-layout {
    margin: 12px auto;
    padding: 0 10px 40px;
  }

  .catalog-header {
    margin-bottom: 10px;
  }

  .catalog-title {
    font-size: 16px;
  }

  .catalog-subtitle {
    font-size: 11px;
  }

  /* 商品グリッド: TEMU名物 2列表示！ */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .product-card {
    border-radius: 8px;
  }

  .card-body {
    padding: 8px;
  }

  .card-title {
    font-size: 12px;
    margin-bottom: 4px;
    height: 2.6em;
    line-height: 1.3;
  }

  .card-sales-info {
    font-size: 10px;
  }

  .sales-progress-bar {
    height: 4px;
    margin-bottom: 6px;
  }

  .price-group .currency {
    font-size: 12px;
  }

  .price-group .main-price {
    font-size: 20px;
  }

  .price-group .orig-price {
    font-size: 10px;
  }

  .card-footer-tags {
    font-size: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 2px;
  }

  .add-to-cart-btn {
    padding: 6px 8px;
    font-size: 11px;
    border-radius: 16px;
  }

  /* 商品詳細モーダル */
  .modal-box {
    padding: 16px;
    border-radius: 12px;
    max-height: 85vh;
  }

  .modal-title {
    font-size: 15px;
  }

  .modal-now-price {
    font-size: 22px;
  }

  .modal-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .btn-primary, .btn-secondary {
    padding: 10px;
    font-size: 14px;
  }

  /* カートドロワー (全幅) */
  .cart-drawer {
    max-width: 100%;
  }

  /* ルーレットモーダル */
  .roulette-modal-box {
    max-width: 92vw;
    padding: 16px 12px;
  }

  .wheel-outer-wrapper {
    width: 220px;
    height: 220px;
    margin-bottom: 16px;
  }

  .wheel-canvas {
    width: 220px;
    height: 220px;
  }

  .spin-action-btn {
    padding: 10px 24px;
    font-size: 15px;
  }

  /* 画面左下TEMU通知 */
  .live-activity-box {
    bottom: 66px; /* ボトムナビの上 */
    left: 10px;
    right: 10px;
    max-width: calc(100% - 20px);
    font-size: 10px;
    padding: 6px 12px;
  }
}

/* 超小型スマホ (幅 360px 以下) */
@media (max-width: 360px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .card-body {
    padding: 6px;
  }

  .price-group .main-price {
    font-size: 18px;
  }

  .add-to-cart-btn {
    font-size: 10px;
    padding: 5px;
  }
}

