/* ==========================================================================
   RoboKnocks — shared site theme
   Brand: navy background, bright yellow accent, playful rounded headings
   ========================================================================== */

:root {
  --navy: #1b1b4e;
  --navy-light: #2a2a68;
  --navy-dark: #121236;
  --yellow: #f5df3d;
  --yellow-dark: #e0c81f;
  --white: #ffffff;
  --ink: #1c1c2e;
  --muted: #6b6b85;
  --border: #e6e6f0;
  --bg: #fbfbff;
  --success: #2e9e5b;
  --danger: #d64545;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(27, 27, 78, 0.12);
  --font-head: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Poppins', system-ui, sans-serif;
  --font-script: 'Caveat', cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
h1, h2, h3, h4, h5 { font-family: var(--font-head); font-weight: 700; margin: 0 0 0.5em; line-height: 1.25; }
p { margin: 0 0 1em; }
a { color: var(--navy); text-decoration: none; }
img { max-width: 100%; display: block; }
ul { padding-left: 1.2em; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--yellow); color: var(--navy-dark); }
.btn-primary:hover { background: var(--yellow-dark); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-white { background: var(--white); color: var(--navy); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 8px 18px; font-size: 0.9rem; }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  flex-wrap: wrap;
}
.logo { display: flex; flex-direction: column; line-height: 1; color: var(--white); }
.logo-script {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--yellow);
  font-weight: 700;
}
.logo-tagline { font-size: 0.7rem; color: #cfcfe8; margin-top: 2px; }
.footer-logo { font-size: 2.2rem; }

.main-nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.main-nav a {
  color: var(--white);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}
.main-nav a:hover { color: var(--yellow); }
.nav-cart {
  background: var(--yellow);
  color: var(--navy-dark) !important;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600 !important;
}
.cart-badge {
  background: var(--navy-dark);
  color: var(--yellow);
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 1px 7px;
  margin-left: 6px;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 26px; height: 3px; background: var(--white); border-radius: 3px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 70px 0;
  overflow: hidden;
}
.hero-inner { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.hero-text { flex: 1 1 420px; }
.hero-text h1 { font-size: 2.6rem; color: var(--white); }
.hero-text h1 span { color: var(--yellow); }
.hero-text p { color: #dcdcf2; font-size: 1.1rem; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.hero-visual {
  flex: 1 1 320px;
  display: flex;
  justify-content: center;
}
.hero-badge {
  background: var(--yellow);
  color: var(--navy-dark);
  border-radius: var(--radius);
  padding: 26px;
  max-width: 320px;
  box-shadow: var(--shadow);
  font-family: var(--font-head);
  text-align: center;
}
.hero-badge .big { font-size: 2.4rem; font-weight: 800; display: block; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--white); }
.section-navy { background: var(--navy); color: var(--white); }
.section-navy h2 { color: var(--white); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 42px; }
.section-head .eyebrow {
  display: inline-block;
  color: var(--navy);
  background: var(--yellow);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.section-head p { color: var(--muted); }

/* ---------- Grids / Cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 10px; }
.card .icon-badge {
  width: 52px; height: 52px;
  background: var(--yellow);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

/* ---------- Product cards ---------- */
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.product-thumb {
  aspect-ratio: 4/3;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yellow);
  font-family: var(--font-head);
  font-size: 1.1rem;
  text-align: center;
  padding: 14px;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-type-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f0f0ff;
  color: var(--navy);
  padding: 3px 10px;
  border-radius: 999px;
}
.product-price { font-family: var(--font-head); font-size: 1.3rem; color: var(--navy); margin-top: auto; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number],
textarea, select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  background: var(--white);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--navy); }
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  max-width: 520px;
  margin: 0 auto;
}
.form-hint { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

/* ---------- Alerts ---------- */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}
.alert-success { background: #e5f7ec; color: var(--success); border: 1px solid #bfe9cf; }
.alert-error { background: #fbeaea; color: var(--danger); border: 1px solid #f3c6c6; }
.alert-info { background: #eef0ff; color: var(--navy); border: 1px solid #d6daff; }

/* ---------- Tables (store/admin) ---------- */
table { width: 100%; border-collapse: collapse; background: var(--white); }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { background: #f4f4fb; font-family: var(--font-head); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.status-pill { padding: 3px 10px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; text-transform: uppercase; }
.status-new { background: #eef0ff; color: var(--navy); }
.status-contacted, .status-confirmed { background: #fff6da; color: #916b00; }
.status-shipped { background: #e0f0ff; color: #0b5fa5; }
.status-delivered { background: #e5f7ec; color: var(--success); }
.status-cancelled { background: #fbeaea; color: var(--danger); }
.status-open { background: #fff6da; color: #916b00; }
.status-answered { background: #e5f7ec; color: var(--success); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #cfcfe8; padding-top: 50px; }
.footer-inner { display: flex; gap: 50px; flex-wrap: wrap; padding-bottom: 30px; }
.footer-brand { flex: 1 1 260px; }
.footer-brand p { color: #a9a9c8; }
.footer-social a { color: var(--yellow); margin-right: 16px; font-weight: 600; }
.footer-col { flex: 1 1 160px; }
.footer-col h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 14px; }
.footer-col a, .footer-col p { display: block; color: #a9a9c8; margin-bottom: 8px; font-size: 0.9rem; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0;
  font-size: 0.82rem;
  color: #82829e;
  text-align: center;
}

/* ---------- Misc ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge-yellow { background: var(--yellow); color: var(--navy-dark); padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: 0.78rem; }
.divider { height: 1px; background: var(--border); margin: 30px 0; border: none; }
.qty-input { width: 70px; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; margin-bottom: 30px; }
.dash-stat { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.dash-stat .num { font-family: var(--font-head); font-size: 1.9rem; color: var(--navy); }
.dash-stat .label { color: var(--muted); font-size: 0.85rem; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--navy); color: var(--white); padding: 24px 16px; flex-shrink: 0; }
.admin-sidebar a { display: block; color: #cfcfe8; padding: 10px 12px; border-radius: 8px; margin-bottom: 4px; font-size: 0.92rem; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--navy-light); color: var(--white); }
.admin-main { flex: 1; padding: 30px; max-width: 1100px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    background: var(--navy);
    padding: 16px 0 6px;
  }
  .main-nav.open { display: flex; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; display: flex; overflow-x: auto; gap: 6px; }
  .admin-sidebar a { white-space: nowrap; margin-bottom: 0; }
}
