/* Layout: sticky footer */
html,
body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f3f4f6; /* or your existing bg */
}

/* The main content area should grow to fill available space */
.site-main {
  flex: 1;
  display: block;
}

/* Optional: ensures inner content doesn't stick to footer */
.site-main > .container {
  padding-bottom: 24px;
}






:root {
  --bg: #0f172a;
  --accent: #f97316;
  --accent-soft: rgba(249,115,22,0.08);
  --text: #111827;
  --muted: #6b7280;
  --radius: 14px;
  --shadow-soft: 0 10px 30px rgba(15,23,42,0.12);
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #f3f4f6;
}

.container {
  width: 100%;
  max-width: 1200px;
  padding: 0 16px;
  margin: 0 auto;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #111827;
  font-weight: 700;
}

.brand-logo {
  background: var(--accent);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.nav {
  display: flex;
  gap: 16px;
}
.nav a {
  text-decoration: none;
  color: #4b5563;
  font-size: 14px;
}
.nav a:hover { color: var(--accent); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  padding: 8px 14px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.hero {
  padding: 24px 0 12px;
}
.hero h1 {
  font-size: 24px;
  margin: 0 0 8px;
}
.hero p {
  color: var(--muted);
  margin: 0;
}

.coupon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
  gap: 16px;
  margin: 20px 0 40px;
}

.coupon-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.coupon-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15,23,42,0.18);
}
.coupon-card a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.coupon-img {
  position: relative;
  height: 120px;
  background: #111827;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.coupon-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.placeholder-logo {
  color:#fff;
  font-size: 20px;
  font-weight:600;
}
.tag.free {
  position:absolute;
  top:8px;
  left:8px;
  background: #22c55e;
  color:#fff;
  padding:3px 8px;
  border-radius:999px;
  font-size:10px;
}

.coupon-body {
  padding: 10px 10px 12px;
}
.coupon-body h2{
  font-size:14px;
  margin:0 0 4px;
}
.coupon-body p{
  font-size:12px;
  color:var(--muted);
  margin:0 0 6px;
}
.coupon-meta {
  display:flex;
  justify-content:space-between;
  font-size:11px;
  color:#6b7280;
}

.site-footer {
  background:#111827;
  color:#9ca3af;
  padding:24px 0 10px;
  margin-top:40px;
  font-size:12px;
}

.footer-grid {
  display:grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap:16px;
}

.footer-bottom {
  text-align:center;
  margin-top:10px;
  color:#6b7280;
}

.nav-toggle {
  display:none;
  background:none;
  border:none;
  font-size:20px;
}

.alert {
  padding:8px 12px;
  background:#fee2e2;
  color:#991b1b;
  border-radius:8px;
  margin:10px 0;
}
.alert.success {
  background:#dcfce7;
  color:#166534;
}

.auth-form,
.coupon-form {
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:10px 0 30px;
}
.auth-form input,
.coupon-form input,
.coupon-form textarea,
.coupon-form select {
  padding:8px 10px;
  border-radius:8px;
  border:1px solid #d1d5db;
  font-size:13px;
  width:100%;
}

.admin-table {
  width:100%;
  border-collapse:collapse;
  font-size:12px;
}
.admin-table th,
.admin-table td {
  border:1px solid #e5e7eb;
  padding:6px 8px;
}

.checkbox-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  gap:6px;
}

@media (max-width:768px) {
  .nav { 
    display:none; 
    position:absolute; 
    top:56px; 
    right:0; 
    background:#fff; 
    padding:12px; 
    flex-direction:column; 
    box-shadow:var(--shadow-soft); 
  }
  .nav.show { display:flex; }
  .nav-toggle { display:block; }
}
