/*
Theme Name: Oopbuy Find
Theme URI: https://oopbuy-find.online/
Author: Oopbuy Find
Author URI: https://oopbuy-find.online/
Description: A dark, modern SEO-optimized WordPress theme for Oopbuy Shipping, Oopbuy Spreadsheet, and shopping guides. Features a mature dark UI with purple accents, product category navigation, and long-form SEO article templates targeting Western audiences.
Version: 1.2.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oopbuy-find
Tags: dark, one-column, custom-menu, featured-images, translation-ready, blog, e-commerce
*/

/* ==========================================================================
   Oopbuy Find - Dark Theme with Purple Accents
   Design tokens live in assets/css/main.css - this file must exist for WP.
   ========================================================================== */

:root {
  --bg-primary: #0a0a0f;
  --bg-surface: #14141c;
  --bg-card: #1a1a25;
  --bg-elevated: #22222f;
  --text-primary: #ffffff;
  --text-secondary: #b4b4c0;
  --text-muted: #7c7c8a;
  --purple-primary: #8b5cf6;
  --purple-hover: #a78bfa;
  --purple-dark: #6d28d9;
  --purple-glow: rgba(139, 92, 246, 0.35);
  --border: #2a2a38;
  --border-light: #3a3a4a;
  --success: #10b981;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --shadow-purple: 0 8px 24px rgba(139, 92, 246, 0.25);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1240px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple-hover); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text-primary); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--purple-primary), var(--purple-dark));
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  box-shadow: var(--shadow-purple);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.primary-nav a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}
.primary-nav a:hover, .primary-nav a.active {
  color: var(--text-primary);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  background: var(--purple-primary);
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition);
}
.nav-cta:hover { background: var(--purple-hover); transform: translateY(-1px); }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, var(--purple-glow), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  font-size: 13px;
  color: var(--purple-hover);
  margin-bottom: 22px;
  background: rgba(139, 92, 246, 0.06);
}
.hero h1 {
  font-size: clamp(36px, 5.5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 22px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--purple-hover), #d8b4fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lede {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--purple-primary);
  color: #fff;
  box-shadow: var(--shadow-purple);
}
.btn-primary:hover {
  background: var(--purple-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.4);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--purple-primary);
  color: var(--text-primary);
}
.btn-ghost {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-elevated);
  border-color: var(--purple-primary);
  color: #fff;
}

/* ---------- Category dropdown selector ---------- */
.category-picker {
  max-width: 620px;
  margin: 0 auto 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}
.category-picker-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  text-align: left;
}
.category-select-row {
  display: flex;
  gap: 10px;
}
.category-select {
  flex: 1;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23b4b4c0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}
.category-select:focus { border-color: var(--purple-primary); }
.category-select option { background: var(--bg-elevated); color: var(--text-primary); }

/* ---------- Section ---------- */
section { padding: 72px 0; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-eyebrow {
  display: inline-block;
  color: var(--purple-hover);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 3.8vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  line-height: 1.2;
}
.section-lede {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Category grid ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--purple-primary), var(--purple-hover));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.cat-card:hover {
  background: var(--bg-elevated);
  border-color: var(--purple-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: #fff;
}
.cat-card:hover::before { transform: scaleX(1); }
.cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(139, 92, 246, 0.05));
  display: grid;
  place-items: center;
  color: var(--purple-hover);
}
.cat-name { font-size: 17px; font-weight: 600; color: var(--text-primary); }
.cat-desc { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.cat-link {
  margin-top: auto;
  color: var(--purple-hover);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Article/Post grid ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  color: var(--text-primary);
}
.post-card:hover {
  border-color: var(--purple-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
}
.post-thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--purple-dark), #4c1d95 60%, #1e1b4b);
  position: relative;
  overflow: hidden;
}
.post-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.15), transparent 60%);
}
.post-thumb-label {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 2;
  background: rgba(0,0,0,0.55);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.post-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
}
.post-excerpt { font-size: 14.5px; color: var(--text-secondary); line-height: 1.55; }
.post-meta {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.post-read { color: var(--purple-hover); font-weight: 600; }

/* ---------- Long-form article ---------- */
.article {
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 24px 40px;
}
.article-header { text-align: left; margin-bottom: 40px; }
.article-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.article-breadcrumb a { color: var(--text-secondary); }
.article-breadcrumb a:hover { color: var(--purple-hover); }
.article h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 20px;
}
.article-meta {
  display: flex;
  gap: 20px;
  color: var(--text-muted);
  font-size: 14px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.article-body { color: var(--text-secondary); font-size: 17px; line-height: 1.8; }
.article-body p { margin-bottom: 22px; }
.article-body h2 {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 46px 0 18px;
  line-height: 1.25;
}
.article-body h3 {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  margin: 34px 0 14px;
}
.article-body ul, .article-body ol { margin: 0 0 22px 22px; }
.article-body li { margin-bottom: 8px; }
.article-body a {
  color: var(--purple-hover);
  border-bottom: 1px dashed rgba(167, 139, 250, 0.4);
  padding-bottom: 1px;
}
.article-body a:hover { color: #fff; border-color: var(--purple-hover); }
.article-body strong { color: var(--text-primary); font-weight: 700; }
.article-body blockquote {
  border-left: 3px solid var(--purple-primary);
  padding: 12px 20px;
  background: var(--bg-card);
  margin: 26px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-primary);
  font-style: italic;
}
.article-cta {
  margin: 44px 0;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(139, 92, 246, 0.03));
  border: 1px solid rgba(139, 92, 246, 0.3);
  text-align: center;
}
.article-cta h3 {
  color: #fff;
  margin: 0 0 10px;
  font-size: 22px;
}
.article-cta p {
  color: var(--text-secondary);
  margin: 0 0 20px;
  font-size: 16px;
}
.article-tags {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.article-tag {
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---------- Related posts ---------- */
.related-section {
  border-top: 1px solid var(--border);
  padding: 60px 0;
  background: var(--bg-surface);
}

/* ---------- Feature strip ---------- */
.feature-strip {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}
.feature-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.feature-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--purple-hover);
  display: grid;
  place-items: center;
}
.feature-item h4 { font-size: 16px; color: var(--text-primary); margin-bottom: 6px; }
.feature-item p { font-size: 14px; color: var(--text-muted); line-height: 1.5; }

/* ---------- Footer ---------- */
.site-footer {
  background: #060609;
  border-top: 1px solid var(--border);
  padding: 56px 0 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.footer-brand p { color: var(--text-muted); font-size: 14px; margin-top: 14px; max-width: 320px; }
.footer-col h5 {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text-primary);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text-muted); font-size: 14px; }
.footer-col a:hover { color: var(--purple-hover); }
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 12px 20px 20px;
  }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: 12px 0; border-bottom: 1px solid var(--border); width: 100%; }
  .primary-nav a:last-child { border-bottom: none; }
  .nav-cta { align-self: flex-start; margin-top: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .hero { padding: 60px 0 40px; }
  section { padding: 48px 0; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 100%; }
  .category-select-row { flex-direction: column; }
}
