/* === DESIGN SYSTEM === */
:root {
  --color-primary: #e8600a;
  --color-primary-dark: #c74f00;
  --color-primary-light: #ff8c3a;
  --color-accent: #ff4444;
  --color-bg: #f5f5f5;
  --color-bg-white: #ffffff;
  --color-bg-section: #eaeaea;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-text-muted: #999999;
  --color-text-white: #ffffff;
  --color-border: #e0e0e0;
  --color-border-light: #f0f0f0;
  --color-footer-bg: #2d2d2d;
  --color-footer-text: #cccccc;
  --color-badge-new: #e8600a;
  --color-badge-sale: #ff4444;
  --color-badge-coupon: #4caf50;
  --color-amazon: #ff9900;
  --color-rakuten: #bf0000;
  --color-yahoo: #ff0033;
  --tag-food: #8d6e63;
  --tag-daily: #66bb6a;
  --tag-fashion: #ab47bc;
  --tag-electronics: #42a5f5;
  --tag-books: #ffa726;
  --tag-store: #f5f5f5;
  --tag-store-text: #555;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fs-xs: 0.7rem;
  --fs-sm: 0.8rem;
  --fs-base: 0.95rem;
  --fs-md: 1.05rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.15);
  --tr-fast: 0.15s ease;
  --tr-base: 0.25s ease;
}

/* === DARK MODE === */
.dark-mode {
  --color-bg: #1a1a2e;
  --color-bg-white: #16213e;
  --color-bg-section: #0f3460;
  --color-text: #e0e0e0;
  --color-text-light: #b0b0b0;
  --color-text-muted: #888888;
  --color-border: #2a2a4a;
  --color-border-light: #1e1e3a;
  --color-footer-bg: #0a0a1a;
  --tag-store: #1e1e3a;
  --tag-store-text: #bbb;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.dark-mode .site-header {
  background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
}

.dark-mode .search-bar-wrapper {
  background: #1e1e3a;
}

.dark-mode .search-bar-wrapper:focus-within {
  background: #16213e;
}

.dark-mode .store-card {
  background: var(--color-bg-white);
}

.dark-mode .store-card.active {
  background: linear-gradient(135deg, #1a1a2e, #0f3460);
}

.dark-mode .tab-btn {
  background: var(--color-bg-white);
}

.dark-mode .tab-btn:hover {
  background: #1e1e3a;
}

.dark-mode .tab-btn.active {
  background: var(--color-bg-white);
}

.dark-mode .rank-item:hover,
.dark-mode .cat-link:hover {
  background: #1e1e3a;
}

.dark-mode .widget-header {
  background: linear-gradient(135deg, #1e1e3a, #16213e);
}

.dark-mode .load-more-btn {
  background: var(--color-bg-white);
}

.dark-mode .deal-image-fallback {
  background: linear-gradient(135deg, #1e1e3a, #16213e) !important;
}

.dark-mode .sort-select {
  background: var(--color-bg-white);
  color: var(--color-text);
  border-color: var(--color-border);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%
}

body {
  font-family: var(--font-family);
  font-size: var(--fs-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 60px;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--tr-fast)
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit
}

img {
  max-width: 100%;
  height: auto;
  display: block
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-md)
}

/* === HEADER === */
.site-header {
  background: linear-gradient(135deg, #fff 0%, #fff8f0 100%);
  border-bottom: 3px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between
}

.logo-area {
  display: flex;
  align-items: center;
  gap: var(--space-sm)
}

.logo-icon {
  font-size: 2.2rem;
  animation: swing 2s ease-in-out infinite
}

@keyframes swing {

  0%,
  100% {
    transform: rotate(-5deg)
  }

  50% {
    transform: rotate(5deg)
  }
}

.logo-title {
  font-size: var(--fs-xl);
  font-weight: 900;
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: -0.02em
}

.logo-accent {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text
}

.logo-subtitle {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
  margin-top: -2px
}

.header-nav {
  display: flex;
  gap: var(--space-lg)
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.dark-mode-toggle {
  font-size: 1.3rem;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  transition: all var(--tr-fast);
  background: transparent;
}

.dark-mode-toggle:hover {
  background: rgba(232, 96, 10, 0.1);
  transform: rotate(20deg);
}

.fav-header-btn {
  position: relative;
  font-size: 1.1rem;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  transition: all var(--tr-fast);
  background: transparent;
}

.fav-header-btn:hover,
.fav-header-btn.active {
  background: rgba(255, 68, 68, 0.1);
}

.fav-header-btn.active {
  box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.3);
}

.fav-count-badge {
  display: none;
  position: absolute;
  top: -2px;
  right: -4px;
  background: var(--color-accent);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

.nav-link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text-light);
  padding: var(--space-xs) 0;
  position: relative
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--tr-base)
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary)
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm)
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: var(--tr-fast)
}

/* === PROMO BANNER === */
.promo-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 50%, #b8430a 100%);
  overflow: hidden;
  position: relative
}

.promo-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: shimmer 4s linear infinite
}

@keyframes shimmer {
  0% {
    transform: rotate(0deg)
  }

  100% {
    transform: rotate(360deg)
  }
}

.banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1
}

.banner-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  color: var(--color-text-white);
  padding: var(--space-xs) var(--space-md);
  border-radius: 20px;
  font-size: var(--fs-sm);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  animation: pulse 2s ease-in-out infinite
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.05)
  }
}

.banner-title {
  color: var(--color-text-white);
  font-size: var(--fs-xl);
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  line-height: 1.3
}

.banner-sub {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-sm);
  margin-top: var(--space-xs)
}

.banner-decoration {
  display: flex;
  gap: var(--space-md);
  font-size: 2rem
}

.banner-box {
  animation: float 3s ease-in-out infinite
}

.box2 {
  animation-delay: 0.5s
}

.box3 {
  animation-delay: 1s
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-8px)
  }
}

/* === SEARCH BAR === */
.search-section {
  background: var(--color-bg-white);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s ease;
}

.search-bar-wrapper {
  display: flex;
  align-items: center;
  background: #f8f8f8;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-sm) var(--space-md);
  transition: all var(--tr-base);
  gap: var(--space-sm)
}

.search-bar-wrapper:focus-within {
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(232, 96, 10, 0.15)
}

.search-icon {
  font-size: 1.2rem;
  flex-shrink: 0
}

.search-input {
  flex: 1;
  border: none;
  background: none;
  font-family: var(--font-family);
  font-size: var(--fs-base);
  color: var(--color-text);
  outline: none;
  padding: var(--space-xs) 0
}

.search-input::placeholder {
  color: var(--color-text-muted)
}

.search-clear-btn {
  display: none;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 50%;
  transition: all var(--tr-fast)
}

.search-clear-btn.visible {
  display: flex
}

.search-clear-btn:hover {
  background: var(--color-border);
  color: var(--color-text)
}

.search-status {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
  padding-left: var(--space-md);
  min-height: 1.4em
}

/* === STORE LINKS (3 stores + ALL) === */
.store-links {
  background: var(--color-bg-white);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s ease;
}

.store-grid-3 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md)
}

.store-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-sm);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--tr-base);
  background: var(--color-bg-white);
  font-family: var(--font-family)
}

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

.store-card.active {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, #fff8f0, #fff2e6);
  box-shadow: 0 0 0 2px rgba(232, 96, 10, 0.2)
}

.store-logo {
  font-weight: 900;
  font-size: var(--fs-lg);
  color: var(--color-text);
  letter-spacing: -0.03em
}

.store-logo.amazon {
  color: var(--color-amazon)
}

.store-logo.rakuten {
  color: var(--color-rakuten)
}

.store-logo.yahoo {
  color: var(--color-yahoo)
}

.store-name {
  font-size: var(--fs-xs);
  color: var(--color-text-light)
}

/* === CATEGORY TABS === */
.category-section {
  background: var(--color-bg-section);
  padding: var(--space-lg) 0 0;
  transition: background 0.3s ease;
}

.category-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none
}

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

.tab-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text-light);
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-bottom: 3px solid transparent;
  transition: all var(--tr-fast);
  white-space: nowrap
}

.tab-btn:hover {
  color: var(--color-primary);
  background: #fff8f0
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 700;
  background: var(--color-bg-white)
}

.tab-icon {
  font-size: 1.1rem
}

/* === SORT CONTROLS === */
.sort-section {
  background: var(--color-bg-section);
  padding: var(--space-sm) 0;
  transition: background 0.3s ease;
}

.sort-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
}

.sort-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-light);
  white-space: nowrap;
}

.sort-select {
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg-white);
  cursor: pointer;
  transition: all var(--tr-fast);
  appearance: auto;
}

.sort-select:hover {
  border-color: var(--color-primary);
}

.sort-select:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 96, 10, 0.15);
}

.deal-count-label {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-left: auto;
}

/* === TWO COLUMN LAYOUT === */
.main-content-wrapper {
  background: var(--color-bg-section);
  padding: 0 0 var(--space-2xl);
  transition: background 0.3s ease;
}

.two-col {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  padding-top: var(--space-md)
}

.deals-column {
  flex: 1;
  min-width: 0
}

.sidebar-column {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  position: sticky;
  top: 80px
}

/* === DEALS GRID === */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md)
}

.deal-card {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--tr-base);
  cursor: pointer;
  position: relative;
  animation: fadeInUp 0.4s ease both;
  display: flex;
  flex-direction: column;
}

.deal-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--color-primary-light)
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* Favorite Button */
.fav-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  font-size: 1.2rem;
  padding: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  transition: all var(--tr-fast);
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fav-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.15);
}

.fav-btn.faved {
  background: rgba(255, 68, 68, 0.15);
}

/* Discount Badge */
.deal-discount-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #ff4444, #cc0033);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 900;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
  animation: discountPop 0.5s ease both
}

@keyframes discountPop {
  0% {
    transform: scale(0) rotate(-10deg)
  }

  50% {
    transform: scale(1.1) rotate(2deg)
  }

  100% {
    transform: scale(1) rotate(0)
  }
}

/* Deal Image - Real Images */
.deal-image-wrapper {
  width: 100%;
  height: 180px;
  position: relative;
  overflow: hidden;
  background: #f0f0f0;
}

.deal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.deal-card:hover .deal-image {
  transform: scale(1.08);
}

.deal-image-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #fafafa, #f0f0f0);
}

/* Card Body */
.deal-card-body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1;
}

.deal-badge-row {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-text-white)
}

.badge-new {
  background: var(--color-badge-new)
}

.badge-sale {
  background: var(--color-badge-sale);
  animation: badgePulse 1.5s ease-in-out infinite
}

@keyframes badgePulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0.8
  }
}

.badge-coupon {
  background: var(--color-badge-coupon)
}

.deal-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.deal-card:hover .deal-title {
  color: var(--color-primary)
}

.deal-time {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.deal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs)
}

.deal-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: var(--fs-xs);
  font-weight: 500
}

.deal-tag-category {
  color: white
}

.deal-tag-category[data-cat="food"] {
  background: var(--tag-food)
}

.deal-tag-category[data-cat="daily"] {
  background: var(--tag-daily)
}

.deal-tag-category[data-cat="fashion"] {
  background: var(--tag-fashion)
}

.deal-tag-category[data-cat="electronics"] {
  background: var(--tag-electronics)
}

.deal-tag-category[data-cat="books"] {
  background: var(--tag-books)
}

.deal-tag-store {
  background: var(--tag-store);
  color: var(--tag-store-text);
  border: 1px solid var(--color-border)
}

.deal-tag-extra {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffe0b2;
}

.dark-mode .deal-tag-extra {
  background: #3e2723;
  color: #ffcc80;
  border-color: #4e342e;
}

.deal-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-top: auto;
  padding-top: var(--space-xs);
}

.deal-price {
  font-size: var(--fs-md);
  font-weight: 900;
  color: var(--color-accent)
}

.deal-price-original {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  text-decoration: line-through;
  font-weight: 400
}

/* Load More */
.load-more-area {
  text-align: center;
  padding: var(--space-xl) 0
}

.load-more-btn {
  padding: var(--space-md) var(--space-2xl);
  background: var(--color-bg-white);
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  font-size: var(--fs-base);
  font-weight: 700;
  border-radius: var(--radius-lg);
  transition: all var(--tr-base)
}

.load-more-btn:hover {
  background: var(--color-primary);
  color: var(--color-text-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md)
}

/* === SIDEBAR WIDGETS === */
.widget {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: background 0.3s ease;
}

.widget-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--color-text);
  border-bottom: 2px solid var(--color-primary);
  background: linear-gradient(135deg, #fff8f0, #fff)
}

.widget-body {
  padding: 0
}

/* Ranking */
.rank-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: background var(--tr-fast)
}

.rank-item:last-child {
  border-bottom: none
}

.rank-item:hover {
  background: #fff8f0
}

.rank-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: var(--fs-xs);
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 2px
}

.rank-num.r1 {
  background: linear-gradient(135deg, #ffd700, #ffb800);
  color: #6b4c00
}

.rank-num.r2 {
  background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
  color: #444
}

.rank-num.r3 {
  background: linear-gradient(135deg, #cd7f32, #b87333);
  color: #fff
}

.rank-num.r4,
.rank-num.r5 {
  background: #eee;
  color: #666
}

.rank-info {
  flex: 1;
  min-width: 0
}

.rank-title {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.rank-item:hover .rank-title {
  color: var(--color-primary)
}

.rank-price {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-accent);
  margin-top: 2px
}

.rank-discount {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-accent);
  background: rgba(255, 68, 68, 0.1);
  padding: 1px 4px;
  border-radius: 2px;
  margin-left: 4px;
}

/* Category Links */
.cat-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border-light);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--tr-fast)
}

.cat-link:last-child {
  border-bottom: none
}

.cat-link:hover {
  background: #fff8f0;
  color: var(--color-primary)
}

.cat-link .cat-count {
  margin-left: auto;
  background: var(--color-bg-section);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-text-muted)
}

/* Coupon Widget */
.coupon-item {
  display: block;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border-light);
  transition: background var(--tr-fast);
  cursor: pointer
}

.coupon-item:last-child {
  border-bottom: none
}

.coupon-item:hover {
  background: #f0fff0
}

.coupon-item-header {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: 4px
}

.coupon-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--color-badge-coupon);
  color: white;
  font-size: var(--fs-xs);
  font-weight: 700
}

.coupon-discount {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-accent)
}

.coupon-title {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

/* === DETAIL MODAL === */
.detail-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: modalBgIn 0.2s ease;
}

.detail-modal.open {
  display: flex;
}

@keyframes modalBgIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-dialog {
  background: var(--color-bg-white);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
  position: relative;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  position: absolute;
  top: 0;
  right: 0;
  padding: var(--space-md);
  z-index: 10;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--tr-fast);
  border: none;
  cursor: pointer;
}

.modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.modal-image-area {
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: #f0f0f0;
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body {
  padding: var(--space-lg);
}

.modal-badges {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.modal-title {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.modal-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: linear-gradient(135deg, #fff8f0, #fff2e6);
  border-radius: var(--radius-md);
}

.dark-mode .modal-price-row {
  background: linear-gradient(135deg, #1e1e3a, #0f3460);
}

.modal-price {
  font-size: var(--fs-xl);
  font-weight: 900;
  color: var(--color-accent);
}

.modal-original-price {
  font-size: var(--fs-base);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.modal-discount {
  padding: 4px 10px;
  background: linear-gradient(135deg, #ff4444, #cc0033);
  color: white;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 900;
}

.modal-description {
  font-size: var(--fs-sm);
  color: var(--color-text-light);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.modal-time {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.modal-actions {
  margin-bottom: var(--space-md);
}

.modal-fav-btn {
  padding: var(--space-sm) var(--space-lg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-light);
  transition: all var(--tr-fast);
  cursor: pointer;
  background: transparent;
}

.modal-fav-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.modal-fav-btn.faved {
  border-color: var(--color-accent);
  background: rgba(255, 68, 68, 0.08);
  color: var(--color-accent);
}

.modal-store-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.modal-store-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--fs-base);
  font-weight: 700;
  color: white;
  text-decoration: none;
  transition: all var(--tr-fast);
  background: #333;
}

.modal-store-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.store-link-amazon {
  background: linear-gradient(135deg, #ff9900, #e88600);
}

.store-link-rakuten {
  background: linear-gradient(135deg, #bf0000, #990000);
}

.store-link-yahoo {
  background: linear-gradient(135deg, #ff0033, #cc0029);
}

/* === FOOTER === */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: var(--space-2xl) 0 var(--space-lg);
  transition: background 0.3s ease;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-md)
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1)
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm)
}

.footer-logo-icon {
  font-size: 1.5rem
}

.footer-logo-text {
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--color-text-white)
}

.footer-links {
  display: flex;
  gap: var(--space-lg)
}

.footer-links a {
  font-size: var(--fs-sm);
  color: var(--color-footer-text);
  transition: color var(--tr-fast)
}

.footer-links a:hover {
  color: var(--color-primary-light)
}

.footer-disclaimer {
  padding: var(--space-lg) 0;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  line-height: 1.8
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--fs-xs);
  color: var(--color-text-muted)
}

/* === MOBILE BOTTOM NAV === */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-white);
  border-top: 1px solid var(--color-border);
  z-index: 200;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08)
}

.mobile-bottom-nav .bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-sm) 0;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  transition: color var(--tr-fast)
}

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

.bottom-nav-icon {
  font-size: 1.2rem
}

/* === RESPONSIVE === */
@media(max-width:900px) {
  .two-col {
    flex-direction: column
  }

  .sidebar-column {
    width: 100%;
    position: static
  }
}

@media(max-width:768px) {
  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-white);
    flex-direction: column;
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--color-border)
  }

  .header-nav.open {
    display: flex
  }

  .hamburger {
    display: flex
  }

  .banner-title {
    font-size: var(--fs-lg)
  }

  .banner-decoration {
    display: none
  }

  .store-grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm)
  }

  .category-tabs {
    gap: 0
  }

  .tab-btn {
    min-width: 100px;
    flex: 0 0 auto;
    padding: var(--space-sm) var(--space-md)
  }

  .deals-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm)
  }

  .deal-image-wrapper {
    height: 200px
  }

  .footer-top {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md)
  }

  .mobile-bottom-nav {
    display: flex
  }

  body {
    padding-bottom: 70px
  }

  .sort-bar {
    flex-wrap: wrap;
  }

  .modal-dialog {
    max-height: 95vh;
    margin: var(--space-sm);
  }

  .modal-image-area {
    height: 180px;
  }

  .fav-header-btn {
    display: none;
  }
}

@media(max-width:480px) {
  .logo-title {
    font-size: var(--fs-lg)
  }

  .store-grid-3 {
    grid-template-columns: repeat(2, 1fr)
  }

  .banner-title {
    font-size: var(--fs-md)
  }

  .search-input {
    font-size: var(--fs-sm)
  }

  .modal-image-area {
    height: 150px;
  }
}

/* === UTILITY === */
.no-results {
  grid-column: 1/-1;
  text-align: center;
  padding: var(--space-2xl);
  color: var(--color-text-muted);
  font-size: var(--fs-md)
}

.no-results .no-results-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  display: block
}

/* Scrollbar styling for modal */
.modal-dialog::-webkit-scrollbar {
  width: 6px;
}

.modal-dialog::-webkit-scrollbar-track {
  background: transparent;
}

.modal-dialog::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

.modal-dialog::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* === AMAZON CTA BUTTON === */
.amazon-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  margin-top: var(--space-sm);
  background: linear-gradient(135deg, #ff9900, #e88600);
  color: #111;
  font-size: var(--fs-sm);
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--tr-base);
  box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
}

.amazon-cta-btn:hover {
  background: linear-gradient(135deg, #ffad33, #ff9900);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 153, 0, 0.4);
}

.modal-amazon-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, #ff9900, #e88600);
  color: #111;
  font-size: var(--fs-base);
  font-weight: 900;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--tr-base);
  box-shadow: 0 4px 16px rgba(255, 153, 0, 0.3);
  letter-spacing: 0.5px;
}

.modal-amazon-cta:hover {
  background: linear-gradient(135deg, #ffad33, #ff9900);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255, 153, 0, 0.5);
}

/* === PRIME BADGE === */
.prime-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: linear-gradient(135deg, #00a4e4, #0077b6);
  color: white;
  font-size: var(--fs-xs);
  font-weight: 700;
  border-radius: 3px;
  letter-spacing: 0.3px;
}

.prime-badge-lg {
  padding: 4px 12px;
  font-size: var(--fs-sm);
}

/* === RATING STARS === */
.deal-rating,
.modal-rating {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin: var(--space-xs) 0;
}

.rating-stars {
  color: #ff9900;
  font-size: var(--fs-sm);
  letter-spacing: 1px;
}

.rating-num {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-text);
}

.review-count {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.modal-rating {
  margin-bottom: var(--space-md);
}

.modal-rating .rating-stars {
  font-size: var(--fs-base);
}

/* === URGENCY === */
.modal-urgency {
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border-left: 4px solid #ff9800;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #e65100;
  margin-bottom: var(--space-md);
}

.dark-mode .modal-urgency {
  background: linear-gradient(135deg, #3e2723, #4e342e);
  color: #ffcc80;
}

/* === AMAZON DISCLAIMER === */
.amazon-disclaimer {
  font-weight: 600;
  color: #ff9900;
  padding: var(--space-xs) 0;
}

/* === DARK MODE AMAZON === */
.dark-mode .amazon-cta-btn,
.dark-mode .modal-amazon-cta {
  color: #111;
}