/* ==========================================================================
   Project Rocks — visual design layer
   Loaded after brand.css. Builds on the vendor theming tokens (--brand-*) so a
   vendor's palette still cascades through every component here.
   Open-source stack only.
   ========================================================================== */

:root {
  --font-display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --surface-2: #ffffff;
  --muted: #6b7280;
  --line: rgba(17, 24, 39, 0.08);
  --radius-sm: 0.6rem;
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --shadow-1: 0 1px 2px rgba(17, 24, 39, .05), 0 1px 3px rgba(17, 24, 39, .06);
  --shadow-2: 0 10px 30px -12px rgba(17, 24, 39, .22);
  --ring: 0 0 0 3px rgba(var(--brand-primary-rgb, 111, 78, 55), .25);
  --container: 1200px;
}

[data-bs-theme="dark"] {
  --surface-2: #191512;
  --muted: #a1a1aa;
  --line: rgba(255, 255, 255, .09);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-2: 0 10px 30px -12px rgba(0, 0, 0, .7);
}

/* --- Base ---------------------------------------------------------------- */
body.layout-fluid { font-family: var(--brand-font, var(--font-body)); }
h1, h2, h3, h4, h5, .display-5, .display-6, .page-title, .card-title {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.page-title { font-weight: 700; }
.section { margin-block: 3rem; }
.section-title { font-weight: 700; font-size: 1.5rem; margin-bottom: .25rem; }
.section-sub { color: var(--muted); margin-bottom: 1.25rem; }
.container-xl { max-width: var(--container); }
.text-secondary { color: var(--muted) !important; }

/* --- Top navigation ------------------------------------------------------ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: saturate(160%) blur(10px);
  background: color-mix(in srgb, var(--brand-surface) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.navbar-brand { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; }
.navbar .nav-link { font-weight: 600; border-radius: var(--radius-sm); padding-inline: .65rem; }
.navbar .nav-link:hover { background: rgba(var(--brand-primary-rgb, 0,0,0), .08); }
.nav-search {
  flex: 1; max-width: 520px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .45rem .9rem;
}
.nav-search input { border: 0; background: transparent; outline: none; width: 100%; }

/* --- Buttons ------------------------------------------------------------- */
.btn-brand {
  background-image: linear-gradient(135deg, var(--brand-primary), var(--brand-accent)) !important;
  border: 0 !important; color: #fff !important; font-weight: 700;
  border-radius: 999px; box-shadow: var(--shadow-1);
}
.btn-brand:hover { filter: brightness(1.05); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.btn-pill { border-radius: 999px; }
.btn-outline-secondary { border-radius: 999px; }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 4rem);
  color: #fff;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(var(--brand-accent-rgb, 47,143,131), .95), transparent 55%),
    radial-gradient(120% 120% at 100% 20%, rgba(var(--brand-primary-rgb, 111,78,55), .95), transparent 60%),
    #241a14;
}
.hero h1 { font-weight: 800; line-height: 1.05; }
.hero .hero-search {
  display: flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.96); color: #111;
  border-radius: 999px; padding: .5rem .5rem .5rem 1.1rem;
  box-shadow: var(--shadow-2); max-width: 560px;
}
.hero .hero-search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 1.05rem; }
.hero .stat { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; }
.hero .stat-label { opacity: .85; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.hero-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25);
  color: #fff; border-radius: 999px; padding: .35rem .8rem; font-size: .85rem; font-weight: 600;
  text-decoration: none;
}
.hero-chip:hover { background: rgba(255,255,255,.28); color: #fff; }

/* --- Category tiles ------------------------------------------------------ */
.tile {
  display: block; border-radius: var(--radius); padding: 1.25rem;
  color: #fff; text-decoration: none; height: 100%;
  border: 0; box-shadow: var(--shadow-1);
  transition: transform .18s ease, box-shadow .18s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); color: #fff; }
.tile .tile-icon { font-size: 1.6rem; }
.tile .tile-name { font-family: var(--font-display); font-weight: 700; margin-top: .5rem; }
.tile .tile-sub { opacity: .85; font-size: .8rem; }
.tile-1 { background-image: linear-gradient(135deg, #6d5bd0, #9b8cff); }
.tile-2 { background-image: linear-gradient(135deg, #0ea5a3, #38d9c8); }
.tile-3 { background-image: linear-gradient(135deg, #d97706, #fbbf24); }
.tile-4 { background-image: linear-gradient(135deg, #db2777, #f472b6); }
.tile-5 { background-image: linear-gradient(135deg, #2563eb, #60a5fa); }

/* --- Product card -------------------------------------------------------- */
.specimen-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--surface-2);
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.specimen-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: transparent; }
.specimen-card .specimen-thumb,
.specimen-card img { transition: transform .35s ease; }
.specimen-card:hover img { transform: scale(1.06); }
.specimen-card .thumb-wrap { position: relative; overflow: hidden; }
.specimen-card .sale-flag {
  position: absolute; top: .6rem; left: .6rem;
  background: linear-gradient(135deg, #ef4444, #f97316); color: #fff;
  border-radius: 999px; padding: .15rem .6rem; font-size: .72rem; font-weight: 700;
}
.specimen-card .card-body { padding: .9rem 1rem 1rem; }
.specimen-card .price-tag { font-family: var(--font-display); font-weight: 800; }
.specimen-card .vendor-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-primary); display: inline-block; margin-right: .35rem; }
.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  background: rgba(var(--brand-primary-rgb, 0,0,0), .08); color: var(--brand-primary);
  border-radius: 999px; padding: .2rem .6rem; font-size: .75rem; font-weight: 600; text-decoration: none;
}

/* --- Detail / buy box ---------------------------------------------------- */
.buy-box { position: sticky; top: 84px; }
.price-hero { font-family: var(--font-display); font-weight: 800; font-size: 2rem; }
.trust-row { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.trust-row i { color: var(--brand-accent); }

/* --- Filter toolbar ------------------------------------------------------ */
.filter-bar {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-1);
}

/* --- Footer -------------------------------------------------------------- */
.app-footer {
  margin-top: 4rem; padding: 3rem 0 2rem;
  background: color-mix(in srgb, var(--brand-ink, #1f1a17) 96%, #000);
  color: rgba(255,255,255,.8);
}
.app-footer a { color: rgba(255,255,255,.75); text-decoration: none; }
.app-footer a:hover { color: #fff; }
.app-footer .footer-link {
  background: none; border: 0; padding: 0; text-align: left;
  color: rgba(255,255,255,.75); font: inherit;
}
.app-footer .footer-link:hover { color: #fff; }
.app-footer .footer-brand { font-family: var(--font-display); font-weight: 800; color: #fff; }

/* --- Motion -------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .specimen-card, .tile, .specimen-card img { transition: none; }
}

/* --- Misc ---------------------------------------------------------------- */
.avatar-brand { background-image: linear-gradient(135deg, var(--brand-primary), var(--brand-accent)); color: #fff; }
.stat-pill { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; }
