@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Outfit:wght@300;400;500&display=swap');

/* ============================================================
   HILO BOOKSHOP — Design System
   hilobookshop.com
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink:    #000000;
  --paper:  #f5f2ed;
  --muted:  #6a6460;
  --accent: #cc1100;
  --border: #ddd9d2;
  --serif:  'Cormorant Garamond', Georgia, serif;
  --sans:   'Outfit', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

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

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 48px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 100;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
}

.nav-logo-main {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-transform: uppercase;
  line-height: 1;
}

.nav-logo-sub {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--ink); }

/* ============================================================
   SHARED COMPONENTS
   ============================================================ */

.section-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.page-header {
  padding: 56px 48px 40px;
  border-bottom: 1px solid var(--border);
}

.page-header-eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.page-header-title {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 300;
  line-height: 1.1;
}

.btn {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.2s;
  text-decoration: none;
  background: transparent;
}

.btn:hover { background: var(--ink); color: var(--paper); }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover { opacity: 0.75; background: var(--ink); color: var(--paper); }

.link-accent {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: opacity 0.2s;
}

.link-accent:hover { opacity: 0.7; }

/* ============================================================
   BOOK CARD
   ============================================================ */

.book-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.book-cover {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 2px;
  box-shadow: 3px 4px 16px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  background: #2a2520;
}

.book-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-cover-fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #1e2a3a, #2a3a4a);
}

.book-cover-text {
  position: relative;
  z-index: 1;
}

.book-cover-title {
  font-family: var(--serif);
  font-size: 10px;
  color: rgba(255,255,255,0.85);
  line-height: 1.3;
}

.book-cover-author {
  font-size: 8px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.book-meta-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
}

.book-meta-author {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.book-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  font-style: italic;
  font-family: var(--serif);
}

.book-price {
  font-size: 12px;
  color: var(--ink);
  font-weight: 400;
}

.book-tag {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 2px;
}

/* ============================================================
   LOADING & EMPTY STATES
   ============================================================ */

.loading-state {
  padding: 80px 48px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.loading-state::before {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-top-color: var(--ink);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  padding: 80px 48px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ============================================================
   NEWSLETTER STRIP
   ============================================================ */

.newsletter-section {
  padding: 52px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  gap: 48px;
}

.newsletter-heading {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 300;
  margin-bottom: 8px;
  color: var(--ink);
}

.newsletter-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.newsletter-form { display: flex; flex-shrink: 0; }

.newsletter-input {
  padding: 12px 16px;
  font-family: var(--sans);
  font-size: 12px;
  border: 1px solid var(--border);
  border-right: none;
  background: transparent;
  color: var(--ink);
  width: 240px;
  outline: none;
  font-weight: 300;
}

.newsletter-input::placeholder { color: var(--muted); }

.newsletter-btn {
  padding: 12px 20px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 300;
  transition: opacity 0.2s;
}

.newsletter-btn:hover { opacity: 0.75; }

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  padding: 28px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
}

.footer-logo {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--ink); }

.footer-address {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  line-height: 1.6;
}

/* ============================================================
   UTILITIES
   ============================================================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}
