/* hotsale.mn — Main Stylesheet */
:root {
  --brand-orange: #ff7900;
  --brand-dark: #1a1a2e;
  --brand-blue: #2969b0;
  --hot-red: #e74c3c;
  --cold-blue: #3498db;
  --bg-main: #f0f2f5;
  --bg-card: #ffffff;
  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --text-muted: #b2bec3;
  --border: #e0e4e8;
  --green: #27ae60;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --radius: 10px;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Nunito Sans',-apple-system,sans-serif; background:var(--bg-main); color:var(--text-primary); line-height:1.5; }
a { color:var(--brand-orange); text-decoration:none; }
a:hover { text-decoration:underline; }

.container { max-width:1200px; margin:0 auto; padding:0 20px; }

/* TOP BAR */
.top-bar { background:var(--brand-dark); color:white; font-size:12px; padding:6px 0; }
.top-bar .container { display:flex; justify-content:space-between; align-items:center; }
.top-bar a { color:#b0b8c8; text-decoration:none; margin-left:16px; transition:color .2s; }
.top-bar a:hover { color:white; }

/* HEADER */
header { background:var(--brand-orange); position:sticky; top:0; z-index:100; box-shadow:0 2px 12px rgba(255,121,0,0.3); }
.header-main { display:flex; align-items:center; padding:10px 0; gap:16px; }
.logo { font-size:26px; font-weight:900; color:white; text-decoration:none; letter-spacing:-0.5px; white-space:nowrap; display:flex; align-items:center; gap:6px; }
.logo:hover { text-decoration:none; }
.logo .flame { font-size:30px; }
.logo .tld { opacity:0.75; font-weight:700; }
.search-bar { flex:1; max-width:560px; position:relative; display:flex; }
.search-bar input { width:100%; padding:10px 44px 10px 16px; border:none; border-radius:24px; font-size:14px; font-family:inherit; outline:none; background:rgba(255,255,255,0.95); }
.search-bar input:focus { box-shadow:0 0 0 3px rgba(255,255,255,0.4); }
.search-bar .search-icon { position:absolute; right:4px; top:50%; transform:translateY(-50%); background:none; border:none; font-size:18px; cursor:pointer; padding:8px; }
.header-actions { display:flex; align-items:center; gap:12px; margin-left:auto; }
.header-actions a { color:white; text-decoration:none; font-weight:700; font-size:13px; padding:8px 16px; border-radius:20px; transition:all .2s; white-space:nowrap; }
.btn-login { background:rgba(255,255,255,0.18); }
.btn-login:hover { background:rgba(255,255,255,0.3); text-decoration:none; }
.btn-signup { background:white; color:var(--brand-orange) !important; }
.btn-signup:hover { background:#f0f0f0; text-decoration:none; }
.btn-submit { background:var(--brand-dark); display:flex; align-items:center; gap:6px; }
.btn-submit:hover { background:#12122a; text-decoration:none; }

/* NAV */
nav { background:white; border-bottom:1px solid var(--border); box-shadow:var(--shadow-sm); }
nav .container { display:flex; align-items:center; overflow-x:auto; scrollbar-width:none; }
nav .container::-webkit-scrollbar { display:none; }
nav a { padding:12px 18px; text-decoration:none; color:var(--text-secondary); font-weight:700; font-size:13px; white-space:nowrap; border-bottom:3px solid transparent; transition:all .2s; }
nav a:hover { color:var(--brand-orange); text-decoration:none; }
nav a.active { color:var(--brand-orange); border-bottom-color:var(--brand-orange); }

/* CATEGORY PILLS */
.category-strip { padding:14px 0; background:white; border-bottom:1px solid var(--border); }
.pills { display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; }
.pills::-webkit-scrollbar { display:none; }
.pill { padding:6px 16px; background:var(--bg-main); border-radius:20px; font-size:13px; font-weight:600; color:var(--text-secondary); white-space:nowrap; cursor:pointer; transition:all .2s; text-decoration:none; display:inline-block; }
.pill:hover { background:#e8e8e8; text-decoration:none; }
.pill.active { background:var(--brand-orange); color:white; }
.pill .emoji { margin-right:4px; }

/* MAIN LAYOUT */
.main-layout { display:grid; grid-template-columns:1fr 340px; gap:24px; padding:24px 0; }
.deals-feed { display:flex; flex-direction:column; gap:12px; }
.feed-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; }
.feed-header h2 { font-size:20px; font-weight:800; }
.feed-tabs { display:flex; gap:4px; background:var(--bg-main); padding:3px; border-radius:8px; }
.feed-tab { padding:6px 14px; font-size:12px; font-weight:700; border-radius:6px; cursor:pointer; color:var(--text-secondary); transition:all .2s; text-decoration:none; }
.feed-tab:hover { text-decoration:none; }
.feed-tab.active { background:white; color:var(--brand-orange); box-shadow:var(--shadow-sm); }

/* DEAL CARDS */
.deal-card { background:var(--bg-card); border-radius:var(--radius); box-shadow:var(--shadow-sm); display:grid; grid-template-columns:64px 140px 1fr; overflow:hidden; transition:box-shadow .2s,transform .15s; position:relative; animation:fadeUp .3s ease both; }
.deal-card:hover { box-shadow:var(--shadow-md); transform:translateY(-1px); }
.deal-temp { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:16px 8px; gap:4px; background:#fafafa; border-right:1px solid var(--border); }
.temp-value { font-size:20px; font-weight:900; line-height:1; }
.temp-value.hot { color:var(--hot-red); }
.temp-value.warm { color:var(--brand-orange); }
.temp-value.cold { color:var(--cold-blue); }
.temp-value.neutral { color:var(--text-muted); }
.temp-label { font-size:10px; color:var(--text-muted); font-weight:700; text-transform:uppercase; }
.vote-btn { width:28px; height:28px; border-radius:50%; border:1.5px solid var(--border); background:white; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:14px; transition:all .2s; color:var(--text-muted); }
.vote-btn:hover { border-color:var(--brand-orange); color:var(--brand-orange); }
.vote-btn.down:hover { border-color:var(--cold-blue); color:var(--cold-blue); }
.vote-btn.voted { border-color:var(--brand-orange); color:var(--brand-orange); background:#fff3e0; }
.vote-btn.down.voted { border-color:var(--cold-blue); color:var(--cold-blue); background:#e3f2fd; }
.deal-image { width:140px; height:140px; display:flex; align-items:center; justify-content:center; padding:12px; background:#fafafa; text-decoration:none; }
.deal-image img { max-width:100%; max-height:100%; object-fit:contain; border-radius:6px; }
.placeholder-img { width:80px; height:80px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:36px; }
.deal-info { padding:14px 18px; display:flex; flex-direction:column; gap:6px; }
.deal-merchant { font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.3px; }
.deal-title { font-size:14px; font-weight:700; color:var(--text-primary); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.4; text-decoration:none; }
.deal-title:hover { color:var(--brand-orange); }
.deal-price-row { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.deal-price { font-size:20px; font-weight:900; color:var(--hot-red); }
.deal-price-old { font-size:13px; color:var(--text-muted); text-decoration:line-through; }
.deal-discount { font-size:11px; font-weight:800; color:white; background:var(--green); padding:2px 8px; border-radius:4px; }
.deal-meta { display:flex; align-items:center; gap:14px; margin-top:auto; font-size:12px; color:var(--text-muted); }
.deal-meta span { display:flex; align-items:center; gap:4px; }
.deal-badge { position:absolute; top:10px; right:14px; font-size:10px; font-weight:800; padding:3px 8px; border-radius:4px; text-transform:uppercase; }
.badge-hot { background:var(--hot-red); color:white; }
.badge-new { background:var(--brand-blue); color:white; }
.badge-free { background:var(--green); color:white; }
.badge-expired { background:#6c757d; color:white; }

/* EXPIRED DEALS */
.deal-expired { opacity:0.65; filter:grayscale(40%); }
.deal-expired:hover { opacity:0.8; }
.deal-expired .deal-title { color:var(--text-muted); }
.deal-expired .deal-price { color:var(--text-muted); text-decoration:line-through; }
.deal-expired .temp-value { color:var(--text-muted) !important; }

/* SIDEBAR */
.sidebar { display:flex; flex-direction:column; gap:20px; }
.sidebar-card { background:white; border-radius:var(--radius); box-shadow:var(--shadow-sm); overflow:hidden; }
.sidebar-card-header { padding:14px 18px; font-weight:800; font-size:15px; border-bottom:1px solid var(--border); display:flex; align-items:center; gap:8px; }
.popular-deal { display:flex; gap:12px; padding:12px 18px; border-bottom:1px solid #f5f5f5; text-decoration:none; color:inherit; transition:background .15s; }
.popular-deal:last-child { border-bottom:none; }
.popular-deal:hover { background:#fafafa; text-decoration:none; }
.popular-deal-rank { font-size:18px; font-weight:900; color:var(--brand-orange); min-width:24px; }
.popular-deal-info { flex:1; }
.popular-deal-title { font-size:13px; font-weight:600; color:var(--text-primary); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.4; }
.popular-deal-temp { font-size:12px; font-weight:800; color:var(--hot-red); margin-top:3px; }
.voucher-code { padding:4px 10px; background:#fff3e0; color:var(--brand-orange); font-size:11px; font-weight:800; border-radius:4px; border:1px dashed var(--brand-orange); letter-spacing:0.5px; }
.newsletter-cta { background:linear-gradient(135deg,var(--brand-orange),#ff5722); border-radius:var(--radius); padding:24px; color:white; text-align:center; }
.newsletter-cta h3 { font-size:18px; font-weight:800; margin-bottom:6px; }
.newsletter-cta p { font-size:13px; opacity:0.9; margin-bottom:14px; }
.newsletter-cta .input-row { display:flex; gap:6px; }
.newsletter-cta input { flex:1; padding:10px 14px; border:none; border-radius:8px; font-size:13px; font-family:inherit; outline:none; }
.newsletter-cta button { padding:10px 18px; background:var(--brand-dark); color:white; border:none; border-radius:8px; font-weight:700; font-size:13px; cursor:pointer; font-family:inherit; }
.stats-row { display:grid; grid-template-columns:1fr 1fr 1fr; text-align:center; padding:16px 0; }
.stat-item { padding:8px; }
.stat-item:not(:last-child) { border-right:1px solid var(--border); }
.stat-number { font-size:18px; font-weight:900; color:var(--brand-orange); }
.stat-label { font-size:10px; font-weight:700; color:var(--text-muted); text-transform:uppercase; }

/* DETAIL PAGE */
.deal-detail-layout { max-width:800px; }
.detail-card { background:white; border-radius:var(--radius); box-shadow:var(--shadow-sm); overflow:hidden; }
.detail-top { display:flex; gap:20px; padding:24px; }
.detail-temp { display:flex; flex-direction:column; align-items:center; gap:6px; min-width:60px; }
.detail-temp .temp-value { font-size:28px; }
.detail-info { flex:1; }
.detail-title { font-size:22px; font-weight:800; line-height:1.3; margin-top:6px; }
.detail-images { padding:0 24px 16px; display:flex; gap:12px; overflow-x:auto; }
.detail-images img { max-height:300px; border-radius:8px; }
.detail-description { padding:16px 24px; border-top:1px solid var(--border); font-size:14px; line-height:1.7; color:var(--text-secondary); }
.btn-go-deal { display:inline-block; background:var(--brand-orange); color:white; font-weight:800; font-size:16px; padding:12px 32px; border-radius:10px; text-decoration:none; transition:background .2s; }
.btn-go-deal:hover { background:#e56d00; text-decoration:none; color:white; }

/* COMMENTS */
.comment-form { padding:16px; border-bottom:1px solid var(--border); }
.comment-form textarea { width:100%; padding:10px; border:1px solid var(--border); border-radius:8px; font-family:inherit; font-size:14px; resize:vertical; margin-bottom:8px; }
.comment-form button, .btn-small { background:var(--brand-orange); color:white; border:none; padding:8px 20px; border-radius:6px; font-weight:700; cursor:pointer; font-family:inherit; }
.comment { padding:16px; border-bottom:1px solid #f5f5f5; }
.comment.reply { margin-left:32px; background:#fafafa; border-radius:8px; margin-top:8px; }
.comment-header { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.comment-author { font-weight:700; font-size:13px; color:var(--text-primary); }
.comment-time { font-size:12px; color:var(--text-muted); }
.comment-edited { font-size:11px; color:var(--text-muted); font-style:italic; }
.comment-body { font-size:14px; line-height:1.5; }
.comment-body p { margin-bottom:4px; }
.comment-actions { margin-top:6px; display:flex; gap:12px; }
.comment-action-btn { background:none; border:none; font-size:12px; color:var(--text-muted); cursor:pointer; font-family:inherit; }
.comment-action-btn:hover { color:var(--brand-orange); }
.comment-replies { margin-top:4px; }

/* FORMS */
.form-card { background:white; border-radius:var(--radius); box-shadow:var(--shadow-sm); padding:32px; max-width:700px; margin:0 auto; }
.form-group { margin-bottom:16px; }
.form-group label { display:block; font-weight:700; font-size:13px; margin-bottom:6px; color:var(--text-primary); }
.form-input, .form-card input[type="text"], .form-card input[type="email"], .form-card input[type="password"], .form-card input[type="url"], .form-card input[type="number"], .form-card input[type="datetime-local"], .form-card textarea, .form-card select { width:100%; padding:10px 14px; border:1px solid var(--border); border-radius:8px; font-size:14px; font-family:inherit; outline:none; transition:border-color .2s; }
.form-input:focus, .form-card input:focus, .form-card textarea:focus, .form-card select:focus { border-color:var(--brand-orange); }
.form-error { color:var(--hot-red); font-size:12px; margin-top:4px; }
.form-help { color:var(--text-muted); font-size:12px; margin-top:2px; display:block; }
.btn-primary { background:var(--brand-orange); color:white; border:none; padding:12px 32px; border-radius:8px; font-weight:800; font-size:15px; cursor:pointer; font-family:inherit; transition:background .2s; }
.btn-primary:hover { background:#e56d00; }

/* PROFILE */
.profile-header { display:flex; gap:24px; align-items:center; background:white; border-radius:var(--radius); box-shadow:var(--shadow-sm); padding:24px; margin-bottom:24px; }
.profile-avatar img, .avatar-placeholder { width:80px; height:80px; border-radius:50%; object-fit:cover; }
.avatar-placeholder { background:var(--brand-orange); color:white; display:flex; align-items:center; justify-content:center; font-size:32px; font-weight:900; }
.profile-info h1 { font-size:24px; font-weight:900; }
.profile-level { background:#fff3e0; color:var(--brand-orange); font-size:12px; font-weight:800; padding:2px 10px; border-radius:10px; margin-right:8px; }
.profile-rep { font-size:13px; color:var(--text-secondary); }
.profile-stats { margin-top:8px; display:flex; gap:16px; font-size:13px; color:var(--text-secondary); }

/* PAGINATION */
.pagination { display:flex; align-items:center; justify-content:center; gap:12px; padding:20px 0; }
.page-btn { padding:8px 18px; background:white; border-radius:8px; font-weight:700; font-size:13px; box-shadow:var(--shadow-sm); color:var(--brand-orange); text-decoration:none; }
.page-btn:hover { background:var(--brand-orange); color:white; text-decoration:none; }
.page-info { font-size:13px; color:var(--text-muted); }

/* ALERT */
.alert { padding:12px 18px; border-radius:8px; font-size:14px; margin-bottom:12px; }
.alert-success { background:#d4edda; color:#155724; }
.alert-error { background:#f8d7da; color:#721c24; }

.empty-state { background:white; border-radius:var(--radius); padding:40px; text-align:center; color:var(--text-muted); box-shadow:var(--shadow-sm); }

/* FOOTER */
footer { background:var(--brand-dark); color:#8892a6; margin-top:40px; padding:40px 0 20px; }
.footer-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:32px; margin-bottom:32px; }
.footer-col h4 { color:white; font-size:14px; font-weight:800; margin-bottom:14px; }
.footer-col a { display:block; color:#8892a6; text-decoration:none; font-size:13px; padding:3px 0; }
.footer-col a:hover { color:var(--brand-orange); }
.footer-bottom { border-top:1px solid rgba(255,255,255,0.08); padding-top:20px; display:flex; justify-content:space-between; align-items:center; font-size:12px; }
.footer-bottom .socials { display:flex; gap:12px; }
.footer-bottom .socials a { width:32px; height:32px; border-radius:50%; background:rgba(255,255,255,0.08); display:flex; align-items:center; justify-content:center; color:#8892a6; text-decoration:none; font-size:14px; }
.footer-bottom .socials a:hover { background:var(--brand-orange); color:white; }
.footer-email { color:#8892a6; }
.footer-email a { color:#8892a6; text-decoration:none; }
.footer-email a:hover { color:var(--brand-orange); }

/* ANIMATIONS */
@keyframes fadeUp { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
.deal-card:nth-child(1){animation-delay:0s} .deal-card:nth-child(2){animation-delay:.04s} .deal-card:nth-child(3){animation-delay:.08s} .deal-card:nth-child(4){animation-delay:.12s} .deal-card:nth-child(5){animation-delay:.16s}

/* RESPONSIVE */
@media(max-width:960px) {
  .main-layout{grid-template-columns:1fr} .sidebar{order:-1} .header-main{flex-wrap:wrap} .footer-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:640px) {
  .deal-card{grid-template-columns:56px 100px 1fr} .deal-image{width:100px;height:100px;padding:8px} .deal-price{font-size:16px} .header-actions{display:none} .top-bar{display:none} .footer-grid{grid-template-columns:1fr} .profile-header{flex-direction:column;text-align:center} .detail-top{flex-direction:column}
}

/* NOTIFICATION BADGE */
.btn-notif { position:relative; font-size:18px; padding:8px 12px !important; }
.notif-badge {
  position:absolute; top:2px; right:2px;
  background:#e74c3c; color:white;
  font-size:10px; font-weight:700;
  min-width:16px; height:16px;
  border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  padding:0 4px;
}

/* DEAL ACTION BUTTONS (share, save) */
.deal-actions-top {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  flex-direction: row;
  gap: 8px;
  z-index: 10;
}
.deal-actions-top button {
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--border);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: all 0.2s;
  opacity: 0.7;
}
.deal-card:hover .deal-actions-top button {
  opacity: 1;
}
.deal-actions-top button:hover {
  transform: scale(1.05);
  border-color: var(--brand-orange);
}
.deal-actions-top button.saved {
  background: #e8f5e9;
  border-color: #4caf50;
}
.deal-actions-top .share-btn:hover {
  background: #e3f2fd;
  border-color: #2196f3;
}

/* SPONSORED DEALS */
.sponsored-section {
  background: linear-gradient(135deg, #fff9e6 0%, #fff3d6 100%);
  border: 1px solid #ffe0a0;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.sponsored-header {
  font-size: 13px;
  font-weight: 800;
  color: #b8860b;
  margin-bottom: 12px;
}
.sponsored-deals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.sponsored-deal-card {
  background: white;
  border-radius: 8px;
  padding: 12px;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.sponsored-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  font-weight: 700;
  color: #b8860b;
  background: #fff9e6;
  padding: 2px 6px;
  border-radius: 3px;
}
.sponsored-content {
  text-decoration: none;
  color: inherit;
}
.sponsored-content:hover { text-decoration: none; }
.sponsored-merchant {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}
.sponsored-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 4px 0;
  line-height: 1.3;
}
.sponsored-price {
  font-size: 16px;
  font-weight: 900;
  color: var(--hot-red);
}
.sponsored-price .discount {
  font-size: 11px;
  background: var(--green);
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
}
@media(max-width:768px) {
  .sponsored-deals { grid-template-columns: 1fr; }
}


/* Ad Containers */
.ad-container {
  position: relative;
  display: inline-block;
  margin: 16px 0;
}
.ad-container img {
  display: block;
  border-radius: 8px;
}
.ad-container .ad-label {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 9px;
  font-weight: 700;
  color: white;
  background: rgba(0,0,0,0.5);
  padding: 2px 6px;
  border-radius: 3px;
}
.ad-banner_top {
  width: 100%;
  text-align: center;
  background: #f8f9fa;
  padding: 8px;
  border-bottom: 1px solid var(--border);
}
.ad-banner_sidebar {
  margin-top: 16px;
}
.ad-banner_inline {
  margin: 16px 0;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

/* DISCUSSION CARDS */
.discussion-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 60px 1fr;
  overflow: hidden;
  transition: box-shadow .2s, transform .15s;
  margin-bottom: 12px;
}
.discussion-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.discussion-votes {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  background: #fafafa;
  border-right: 1px solid var(--border);
}
.discussion-content {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.discussion-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.discussion-category {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-main);
  padding: 2px 8px;
  border-radius: 4px;
}
.discussion-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.4;
}
.discussion-title:hover {
  color: var(--brand-orange);
  text-decoration: none;
}
.discussion-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.discussion-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}
.discussion-footer a:hover {
  color: var(--brand-orange);
}
.discussion-author { font-weight: 600; }
.discussion-comments, .discussion-views { }
@media(max-width:640px) {
  .discussion-card { grid-template-columns: 50px 1fr; }
  .discussion-footer { flex-wrap: wrap; gap: 8px; }
}
