@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #e85d00;
  --primary-dark: #c44f00;
  --dark: #2b2b2b;
  --darker: #1a1a1a;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e2e8f0;
  --bg: #f5f5f5;
  --white: #ffffff;
  --orange-bg: #fff4ec;
  --green: #00963a;
  --green-light: #e8f7ee;
  --red: #d42b2b;
  --shadow: 0 1px 4px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.12), 0 8px 32px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
a { text-decoration: none; color: inherit; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

/* TOPBAR */
.topbar {
  background: var(--darker);
  color: rgba(255,255,255,0.8);
  font-size: 0.78rem;
  padding: 0.4rem 0;
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-links { display: flex; gap: 1.5rem; }
.topbar a { color: rgba(255,255,255,0.8); transition: color 0.15s; }
.topbar a:hover { color: white; }

/* NAV */
nav {
  background: var(--white);
  border-bottom: 3px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 62px;
}
.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--darker);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.logo span { color: var(--primary); }
.search-bar {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.6rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--primary); }
.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.nav-links {
  display: flex;
  gap: 0.2rem;
  list-style: none;
  margin-left: auto;
}
.nav-links a {
  padding: 0.4rem 0.85rem;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-links a:hover { background: var(--orange-bg); color: var(--primary); }
.nav-links a.active { background: var(--primary); color: white; }

/* CATEGORY BAR */
.catbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}
.catbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
}
.cat-item {
  padding: 0.65rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.cat-item:hover { color: var(--primary); border-color: var(--primary); }
.cat-item.active { color: var(--primary); border-color: var(--primary); }

/* PAGE HEADER */
.page-header {
  background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
  color: white;
  padding: 2.5rem 1.5rem;
}
.page-header-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.page-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}
.page-header p { opacity: 0.8; font-size: 0.95rem; }

/* BREADCRUMB */
.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb span { color: var(--text-muted); }

/* MAIN LAYOUT */
.main-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
}

/* SIDEBAR */
.sidebar-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.sidebar-title {
  background: var(--dark);
  color: white;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.sidebar-body { padding: 0.75rem; }
.filter-group { margin-bottom: 1rem; }
.filter-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: block;
}
.filter-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.85rem;
  cursor: pointer;
}
.filter-option input { accent-color: var(--primary); }
.brand-tag {
  display: inline-block;
  background: var(--orange-bg);
  color: var(--primary);
  border: 1px solid #ffd4a8;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0.2rem;
  cursor: pointer;
  transition: background 0.15s;
}
.brand-tag:hover, .brand-tag.active { background: var(--primary); color: white; border-color: var(--primary); }

/* CONTENT HEADER */
.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.content-title {
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.count-badge {
  background: var(--orange-bg);
  color: var(--primary);
  border-radius: 100px;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.sort-select {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.3rem 0.6rem;
  font-size: 0.82rem;
  font-family: 'Outfit', sans-serif;
  background: white;
  cursor: pointer;
}

/* PRODUCT ROW */
.product-list { display: flex; flex-direction: column; gap: 0.75rem; }
.product-row {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 1rem;
  align-items: center;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
  cursor: pointer;
}
.product-row:hover {
  box-shadow: var(--shadow-hover);
  border-color: #ffd4a8;
  transform: translateY(-1px);
}
.product-row-img {
  width: 100px;
  height: 100px;
  background: var(--bg);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.product-row-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}
.pill {
  padding: 0.15rem 0.55rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.pill-new { background: var(--dark); color: white; }
.pill-sale { background: var(--red); color: white; }
.pill-hot { background: var(--primary); color: white; }
.pill-level { background: var(--green-light); color: var(--green); }
.product-brand {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
}
.product-row-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.product-row-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-row-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.product-row-price {
  text-align: right;
  flex-shrink: 0;
  min-width: 140px;
}
.store-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.price-original {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.price-current {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.1rem;
}
.price-current.sale { color: var(--red); }
.price-save {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  background: var(--green-light);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 0.5rem;
}
.btn-go {
  display: block;
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.15s, transform 0.15s;
  border: none;
  cursor: pointer;
  width: 100%;
  font-family: 'Outfit', sans-serif;
}
.btn-go:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ALERT STRIP */
.alert-strip {
  background: var(--orange-bg);
  border: 1px solid #ffd4a8;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

/* COUPON */
.coupon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}
.coupon-card {
  background: white;
  border: 1.5px dashed #ffd4a8;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.coupon-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--primary);
}
.coupon-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.coupon-pct {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  flex-shrink: 0;
  min-width: 60px;
  text-align: center;
}
.coupon-store {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.coupon-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.coupon-code-row { display: flex; align-items: center; gap: 0.5rem; }
.coupon-code {
  background: var(--orange-bg);
  color: var(--primary);
  border: 1px solid #ffd4a8;
  font-family: monospace;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 1.5px;
}
.copy-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  transition: background 0.15s;
}
.copy-btn:hover { background: var(--orange-bg); }

/* AI BOX */
.ai-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 2rem;
}
.ai-box-header {
  background: var(--dark);
  color: white;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ai-box-body { padding: 1rem; }
.ai-input-row { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.ai-input {
  flex: 1;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.ai-input:focus { border-color: var(--primary); }
.ai-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: background 0.15s;
  white-space: nowrap;
}
.ai-btn:hover { background: var(--primary-dark); }
.ai-result {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.9rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  min-height: 80px;
}
.ai-result.has-answer { color: var(--text); }

/* LOADING */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.loading-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text); }

/* FOOTER */
footer {
  background: var(--darker);
  color: rgba(255,255,255,0.8);
  margin-top: 3rem;
  padding: 2.5rem 1.5rem 1.5rem;
}
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-logo { font-size: 1.4rem; font-weight: 800; color: white; margin-bottom: 0.75rem; }
.footer-logo span { color: var(--primary); }
.footer-desc { font-size: 0.82rem; line-height: 1.6; opacity: 0.75; max-width: 240px; }
.footer-col h4 {
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { font-size: 0.82rem; opacity: 0.75; transition: opacity 0.15s; }
.footer-col a:hover { opacity: 1; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-legal { font-size: 0.75rem; opacity: 0.6; }
.affiliate-disclaimer {
  font-size: 0.72rem;
  opacity: 0.6;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--green);
  color: white;
  padding: 0.65rem 1.1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.25s;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.toast.show { transform: translateY(0); opacity: 1; }

/* CONTENT PAGES */
.content-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.content-page h2 { font-size: 1.3rem; font-weight: 800; margin: 1.5rem 0 0.75rem; color: var(--darker); }
.content-page p { color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }
.content-page ul { padding-left: 1.5rem; color: var(--text-muted); line-height: 2; margin-bottom: 1rem; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-row { grid-template-columns: 80px 1fr; }
  .product-row-price { grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem; text-align: left; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .product-row { grid-template-columns: 70px 1fr; }
}
