/* ============================================================
   FileBin.org — base styles
   Plain CSS, no build step required. Organized top to bottom:
   variables -> reset -> layout -> components -> page-specific
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --text: #1a1d21;
  --text-muted: #5b6068;
  --border: #e3e5e8;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --success: #16794f;
  --radius: 10px;
  --max-width: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

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

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

/* ---------- header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

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

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.logo:hover { text-decoration: none; }

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--text); }

/* ---------- hero ---------- */

.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero h1 {
  font-size: 2.4rem;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- product sections ---------- */

.section {
  padding: 48px 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 1.5rem;
  margin: 0 0 8px;
}

.section-subtitle {
  color: var(--text-muted);
  margin: 0 0 32px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.product-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
}

.product-card .badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(79, 70, 229, 0.1);
  padding: 4px 8px;
  border-radius: 999px;
  margin-bottom: 12px;
  width: fit-content;
}

.product-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.product-card .price {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 12px 0 16px;
}

.product-card p.desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
  margin: 0 0 16px;
}

.product-card .card-actions {
  display: flex;
  gap: 10px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--text-muted); }

.btn-block { display: block; width: 100%; }

/* ---------- product detail page ---------- */

.product-detail {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  padding: 56px 0;
  align-items: start;
}

@media (max-width: 720px) {
  .product-detail { grid-template-columns: 1fr; }
}

.product-detail .buy-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg-alt);
  position: sticky;
  top: 90px;
}

.product-detail .buy-box .price {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.product-detail .buy-box .price-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 20px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.feature-list li {
  padding-left: 22px;
  position: relative;
  margin-bottom: 10px;
  color: var(--text-muted);
}
.feature-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* ---------- simple message pages (success / cancel) ---------- */

.message-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}

.message-page .icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.message-page h1 {
  margin: 0 0 12px;
  font-size: 1.8rem;
}

.message-page p {
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto 24px;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
