/*
Theme Name: Bedazzle Lite
Theme URI: https://example.com
Author: Your Store
Author URI: https://example.com
Description: A lightweight, custom-built WordPress ecommerce theme for a bedazzling kit shop. No WooCommerce, no Elementor — built-in product catalog, cart, and Stripe Checkout, with SEO (Open Graph, JSON-LD, meta titles) baked in.
Version: 0.2.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: bedazzle
*/

/* -------------------------------------------------
   Design tokens
------------------------------------------------- */
:root{
  --ink: #241a20;
  --ink-soft: #6b5b64;
  --plum: #4a1836;
  --plum-2: #6d2650;
  --blush: #faf3f5;
  --panel: #fffbfa;
  --line: #ecdde3;
  --gold: #b8872f;
  --gold-light: #f3e3bf;
  --good: #2f6b4f;
  --bad: #a13b3b;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(74,24,54,0.05), 0 8px 24px rgba(74,24,54,0.07);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* -------------------------------------------------
   Reset / base
------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--blush);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, textarea { font-family: inherit; font-size: inherit; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.15; margin: 0 0 14px; font-weight: 600; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* -------------------------------------------------
   Header
------------------------------------------------- */
.site-header {
  background: var(--plum);
  color: #fff;
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  gap: 24px;
}
.site-title { margin: 0; }
.site-title a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand-mark { width: 20px; height: 20px; color: var(--gold); }

.site-header nav ul { display: flex; align-items: center; gap: 30px; }
.site-header nav a {
  color: rgba(255,255,255,0.86);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 2px;
}
.site-header nav a:hover { color: #fff; }
.site-header nav a:not(.cart-link)::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
}
.site-header nav a:not(.cart-link):hover::after { transform: scaleX(1); }

.cart-link {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
}
.cart-count {
  background: var(--gold);
  color: var(--plum);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

@media (max-width: 720px){
  .site-header-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-header nav ul { flex-wrap: wrap; gap: 16px; }
}

/* -------------------------------------------------
   Breadcrumbs
------------------------------------------------- */
.breadcrumbs { margin: 20px 0 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.85rem; color: var(--ink-soft); }
.breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: 6px; color: var(--line); }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--plum); }

/* -------------------------------------------------
   Hero (front page)
------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
  padding: 64px 0 48px;
}
@media (max-width: 780px){ .hero { grid-template-columns: 1fr; text-align: center; } .hero-mark { margin: 0 auto; } }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 10px;
}
.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  max-width: 14ch;
  margin-bottom: 16px;
}
.hero-desc {
  color: var(--ink-soft);
  max-width: 46ch;
  font-size: 1.05rem;
  margin-bottom: 26px;
}
@media (max-width: 780px){ .hero-desc { margin-left: auto; margin-right: auto; } }

/* -------------------------------------------------
   Buttons
------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--plum);
  color: #fff;
  border: none;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.btn:hover { background: var(--plum-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: #d8c9d0; color: #fff; cursor: not-allowed; }
.btn-gold {
  background: var(--gold);
  color: var(--plum);
}
.btn-gold:hover { background: #a5771f; }

/* -------------------------------------------------
   Section headings / page title
------------------------------------------------- */
.page-title {
  font-size: 2rem;
  margin: 44px 0 8px;
}
.archive-description { color: var(--ink-soft); max-width: 60ch; margin-bottom: 8px; }
section > h2 {
  font-size: 1.5rem;
  margin: 48px 0 20px;
}

/* -------------------------------------------------
   Product grid
------------------------------------------------- */
.kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 26px;
  margin: 24px 0 48px;
}
.kit-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease;
}
.kit-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(74,24,54,0.08), 0 16px 32px rgba(74,24,54,0.12);
  text-decoration: none;
}
.kit-card img { aspect-ratio: 1 / 1; object-fit: cover; background: var(--gold-light); }
.kit-card .kit-card-body { padding: 16px 18px 20px; }
.kit-card h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
}
.kit-card .price {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--gold);
  font-size: 1.05rem;
}
.kit-card .stock-status { margin-top: 8px; font-size: 0.82rem; }

/* -------------------------------------------------
   Single product
------------------------------------------------- */
.single-kit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin: 40px 0 64px;
}
@media (max-width: 780px) { .single-kit { grid-template-columns: 1fr; gap: 28px; } }
.single-kit-media img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.single-kit h1 { font-size: 2.1rem; margin-bottom: 6px; }
.single-kit .price {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--gold);
  margin: 6px 0 14px;
}
.stock-status { font-size: 0.9rem; margin-bottom: 18px; font-weight: 500; }
.stock-status.in-stock { color: var(--good); }
.stock-status.out-of-stock { color: var(--bad); }
.kit-excerpt { color: var(--ink-soft); margin-bottom: 22px; max-width: 52ch; }
.add-to-cart-message { font-size: 0.88rem; color: var(--good); margin-top: 10px; min-height: 1.2em; }

/* -------------------------------------------------
   Cart / checkout
------------------------------------------------- */
.cart-table { width: 100%; border-collapse: collapse; margin: 30px 0; }
.cart-table th, .cart-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
}
.cart-table th {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  font-weight: 600;
  text-transform: uppercase;
}
.remove-from-cart {
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.remove-from-cart:hover { border-color: var(--bad); color: var(--bad); }
.cart-total {
  text-align: right;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--plum);
  margin: 24px 0;
}
.checkout-box {
  max-width: 480px;
  margin: 32px 0 64px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.checkout-box p { margin: 0 0 10px; }
.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--ink-soft);
}
.empty-state h1 { margin-bottom: 8px; }

/* -------------------------------------------------
   Pagination
------------------------------------------------- */
.pagination { margin: 24px 0 60px; display: flex; gap: 8px; }
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.pagination .current { background: var(--plum); border-color: var(--plum); color: #fff; }
.pagination a:hover { border-color: var(--plum); color: var(--plum); text-decoration: none; }

/* -------------------------------------------------
   Footer
------------------------------------------------- */
.site-footer {
  background: var(--plum);
  color: rgba(255,255,255,0.72);
  margin-top: 60px;
}
.site-footer .container { padding-top: 32px; padding-bottom: 32px; }
.site-footer p { margin: 0; font-size: 0.88rem; }
