/* styles.css
   gobile — mobile-first, centered layout, Spline Sans Mono branding
   Assumes Spline Sans Mono is loaded via Google Fonts in the page head.
   images in /assets/images/
   favicon in /assets/images/
*/

/* 1. Design tokens and font stacks */
:root{
  --brand-font: "Spline Sans Mono", Inter, "Roboto Mono", ui-monospace, system-ui, sans-serif;
  --ui-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --accent: #0B6EFD;
  --accent-2: #0B9E6F;
  --bg: #F6F8FB;
  --card: #FFFFFF;
  --muted: #6B7280;
  --text: #111827;
  --danger: #E11D48;

  --max-width: 1100px;
  --container-padding: 1rem;
  --radius: 10px;
  --shadow-sm: 0 6px 18px rgba(2,6,23,0.06);
  --shadow-xs: 0 1px 3px rgba(2,6,23,0.04);
  --gap: 1rem;
}

/* 2. Reset and base */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
  font-size: 16px;
}

img { max-width: 100%; display: block; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; }

/* 3. Page container and layout */
.site-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding: 0.75rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* header graphic used in your header.php */
.header-graphic {
  width: 90px;
  height: 72px;
  object-fit: scale-down;
  border-radius: 16px;
  display: block;
}

/* brand block */
.brand h1 {
  margin: 0;
  font-family: var(--brand-font);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1;
}

.brand .tagline {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Navigation */
.site-nav {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  border: 1px solid rgba(2,6,23,0.04);
  margin-bottom: 0.5rem;
}

.nav-inner {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  width: 100%;
}

.nav-list > li {
  position: relative;
}

.nav-list > li > a {
  display: block;
  font-family: var(--brand-font);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-list > li > a:hover,
.nav-list > li > a:focus {
  background: rgba(11,110,253,0.08);
  color: var(--accent);
}

.nav-list .caret {
  font-size: 0.7em;
  margin-left: 0.15rem;
  display: inline-block;
}

/* Dropdown (box-style, shows on hover) */
.has-dropdown .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0 0 0 0;
  padding: 0.4rem;
  list-style: none;
  min-width: 190px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(2,6,23,0.05);
  z-index: 30;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  display: block;
}

.dropdown li a {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  color: var(--text);
  font-family: var(--brand-font);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.dropdown li a:hover,
.dropdown li a:focus {
  background: rgba(11,110,253,0.08);
  color: var(--accent);
}

/* Main content */
.site-main {
  padding: 1rem 0;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 1.25rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

/* 4. Components */

/* Card */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(2,6,23,0.03);
}

/* Hero */
.hero {
  display: grid;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem;
  border-radius: var(--radius);
}

/* Product grid and cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 720px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-card .thumb {
  height: 160px;
  border-radius: 8px;
  object-fit: cover;
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.01));
}

.product-card h3 {
  margin: 0;
  font-family: var(--brand-font);
  font-size: 1rem;
  color: var(--text);
}

.product-card p.desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.product-card p.price {
  margin: 0.25rem 0;
  color: var(--accent);
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  font-family: var(--brand-font);
  text-align: center;
  transition: transform .08s ease, box-shadow .08s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(11,110,253,0.12);
}

.btn-primary:hover,
.btn-primary:focus { filter: brightness(.98); }

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(11,110,253,0.12);
}

/* Form elements */
.form-row { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
label { font-size: 0.95rem; color: var(--muted); }
input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(2,6,23,0.06);
  background: #fff;
  font-size: 0.95rem;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 4px rgba(11,110,253,0.06);
  border-color: var(--accent);
}

/* Table for cart */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
.cart-table th,
.cart-table td {
  padding: 0.6rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(2,6,23,0.04);
}
.cart-table th { font-family: var(--brand-font); font-weight: 700; }

/* Utility classes */
.text-muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.center { text-align: center; }
.row { display: flex; gap: 0.75rem; align-items: center; }
.col { flex: 1; }

/* Badges and labels */
.badge {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(11,110,253,0.08);
  color: var(--accent);
}

/* 5. Accessibility helpers */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Focus ring for keyboard users */
:focus {
  outline: 3px solid rgba(11,110,253,0.12);
  outline-offset: 2px;
}

/* 6. Responsive tweaks and layout helpers */
@media (min-width: 900px) {
  .site-header { padding: 1rem 0; }
  .brand h1 { font-size: 1.25rem; }
  .hero { grid-template-columns: 1fr 320px; align-items: start; }
}

/* 7. Small utilities for product detail */
.product-detail {
  display: grid;
  gap: 1rem;
}
@media (min-width: 720px) {
  .product-detail { grid-template-columns: 1fr 360px; align-items: start; }
}
.product-detail .meta h2 { margin: 0 0 0.25rem 0; font-family: var(--brand-font); }
.product-detail .meta p.price { color: var(--accent); font-weight: 800; font-size: 1.15rem; margin: 0.25rem 0; }

/* 8. Empty state */
.empty-state {
  padding: 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(11,110,253,0.03), rgba(11,110,253,0.01));
  text-align: center;
  color: var(--muted);
}

/* 9. Print friendly */
@media print {
  body { background: #fff; color: #000; }
  .site-nav, .site-footer { display: none; }
  .site-wrap { max-width: 100%; padding: 0; }
}

/* 10. Product Manager, forms and alerts */
input[type="password"],
input[type="tel"] {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(2,6,23,0.06);
  background: #fff;
  font-size: 0.95rem;
  outline: none;
}
input[type="password"]:focus {
  box-shadow: 0 0 0 4px rgba(11,110,253,0.06);
  border-color: var(--accent);
}

.form-card { max-width: 560px; }
.form-card h2 { margin-top: 0; font-family: var(--brand-font); }

.manager { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 720px) {
  .manager { grid-template-columns: 200px 1fr; align-items: start; }
}
.manager h3 { margin-top: 0; font-family: var(--brand-font); }

.category-list { list-style: none; margin: 0; padding: 0; }
.category-list a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-family: var(--brand-font);
  font-size: 0.9rem;
  color: var(--text);
}
.category-list a:hover,
.category-list a.active {
  background: rgba(11,110,253,0.08);
  color: var(--accent);
  text-decoration: none;
}

.right { text-align: right; }

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert-error   { background: rgba(225,29,72,0.08);  color: var(--danger); }
.alert-success { background: rgba(11,158,111,0.10); color: var(--accent-2); }

/* Account sits alone on the right side of the nav */
.nav-list > li.nav-account {
  margin-left: auto;
}

/* Open its dropdown toward the left so it doesn't run off the edge */
.nav-account .dropdown {
  left: auto;
  right: 0;
}
