/*
Theme Name: Hourtale
Description: Custom theme for Hourtale — a serialized comic reading platform with a coin/Gear economy. Coin, Gear, chapter-unlock, spin, quiz, and payment logic all live in the "Hourtale Core" plugin (keep that plugin active) — this theme is purely the visual/structural layer that calls the plugin's functions and shortcodes.
Version: 1.0
Requires Plugins: woocommerce
Text Domain: hourtale
*/

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@400;500;600;700&display=swap');

/* ===== Design tokens ===== */
:root {
  --ht-bg: #14121f;
  --ht-surface: #1e1b2e;
  --ht-surface-2: #2a2438;
  --ht-border: #3d2b4f;
  --ht-border-2: #6b5a7d;
  --ht-brass: #c9a15a;
  --ht-teal: #4fd1c5;
  --ht-parchment: #f2e8d5;
  --ht-text: #f2e8d5;
  --ht-text-muted: #9d8bb0;
}

/* ===== Base ===== */
* { box-sizing: border-box; }
body {
  background: var(--ht-bg);
  color: var(--ht-text);
  font-family: 'Inter', sans-serif;
  margin: 0;
}
a { color: var(--ht-brass); text-decoration: none; }
a:hover { color: var(--ht-teal); }
h1, h2, h3, h4 { font-family: 'Cinzel', serif; color: var(--ht-text); margin: 0 0 12px; }
img { max-width: 100%; height: auto; display: block; }
.ht-container { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.ht-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--ht-surface);
  border-bottom: 1px solid var(--ht-border);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
}
.ht-site-logo {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: var(--ht-text);
  letter-spacing: 0.03em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.ht-site-logo img {
  max-height: 44px;
  width: auto;
  display: block;
}
.ht-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ht-header-actions a.ht-header-btn {
  background: var(--ht-surface-2);
  border: 1px solid var(--ht-border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--ht-text);
  white-space: nowrap;
}
.ht-header-actions a.ht-header-btn:hover { border-color: var(--ht-brass); color: var(--ht-brass); }

.ht-primary-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.ht-primary-nav a {
  color: var(--ht-text-muted);
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 8px;
}
.ht-primary-nav a:hover { background: var(--ht-surface-2); color: var(--ht-text); }

/* ===== Buttons (generic) ===== */
.ht-btn, button, input[type="submit"], .button {
  background: var(--ht-brass);
  color: var(--ht-bg) !important;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: inline-block;
  text-decoration: none !important;
}
.ht-btn:hover, button:hover, .button:hover { background: var(--ht-teal); }

/* ===== Content ===== */
main { min-height: 60vh; padding: 32px 0 60px; }
.entry-content, .ht-page-content { color: var(--ht-text-muted); font-family: 'Lora', serif; line-height: 1.8; }

/* ===== Cards (book promo, tee promo etc) ===== */
.ht-card {
  background: linear-gradient(135deg, var(--ht-surface-2), var(--ht-surface));
  border: 1px solid var(--ht-border);
  border-radius: 16px;
  padding: 20px;
}
.ht-card-row { display: flex; align-items: center; gap: 16px; }

/* ===== WooCommerce basics ===== */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background: var(--ht-surface) !important;
  border: 1px solid var(--ht-surface-2);
  border-radius: 12px;
  padding: 16px !important;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title { color: var(--ht-text) !important; font-family: 'Cinzel', serif !important; }
.woocommerce ul.products li.product .price { color: var(--ht-brass) !important; font-weight: 700; }
.woocommerce table.shop_table, .woocommerce-cart table.cart {
  background: var(--ht-surface) !important;
  border: 1px solid var(--ht-border) !important;
  color: var(--ht-text) !important;
}
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], textarea, select {
  background: var(--ht-bg) !important;
  border: 1px solid var(--ht-border) !important;
  color: var(--ht-text) !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
}

/* ===== Footer ===== */
.ht-site-footer {
  background: var(--ht-surface);
  border-top: 1px solid var(--ht-border);
  color: var(--ht-text-muted);
  padding: 24px 20px;
  text-align: center;
  font-size: 12px;
}
.ht-site-footer a { color: var(--ht-brass); }
