/*
Theme Name: BoostFinds
Theme URI: https://example.com/boostfinds
Author: ChatGPT
Author URI: https://openai.com
Description: Fast affiliate product catalog theme built for PartnerBoost Amazon imported posts, AdSense placements, product grids, and mobile-first product detail pages.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: boostfinds
Tags: blog, grid-layout, custom-colors, custom-logo, featured-images, right-sidebar, e-commerce
*/

:root {
  --bf-bg: #f6f7fb;
  --bf-surface: #ffffff;
  --bf-surface-2: #f2f4f8;
  --bf-text: #121826;
  --bf-muted: #657084;
  --bf-border: #e5e9f2;
  --bf-primary: #ff7a1a;
  --bf-primary-dark: #e76400;
  --bf-dark: #0f172a;
  --bf-success: #14a44d;
  --bf-radius: 22px;
  --bf-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  --bf-shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
  --bf-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bf-bg);
  color: var(--bf-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--bf-primary-dark); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }

.bf-container { width: min(calc(100% - 32px), var(--bf-container)); margin: 0 auto; }
.bf-skip-link { position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.bf-skip-link:focus { left: 16px; top: 16px; width: auto; height: auto; z-index: 1000; background: #fff; padding: 10px 14px; border-radius: 10px; }

/* Header */
.bf-site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--bf-border); }
.bf-topbar { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 18px; }
.bf-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bf-brand .custom-logo { max-height: 46px; width: auto; border-radius: 12px; }
.bf-brand-text { display: grid; gap: 2px; }
.bf-site-title { font-size: clamp(22px, 3vw, 30px); font-weight: 900; letter-spacing: -0.04em; line-height: 1; }
.bf-tagline { color: var(--bf-muted); font-size: 13px; font-weight: 600; }
.bf-nav-wrap { display: flex; align-items: center; gap: 18px; }
.bf-main-menu { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.bf-main-menu a { display: inline-flex; padding: 10px 12px; border-radius: 999px; color: #243044; font-weight: 750; font-size: 14px; }
.bf-main-menu a:hover { background: var(--bf-surface-2); color: var(--bf-primary-dark); }
.bf-search-toggle { display: none; }
.bf-header-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--bf-dark); color: #fff; border-radius: 999px; padding: 11px 16px; font-weight: 850; box-shadow: var(--bf-shadow-soft); }
.bf-header-cta:hover { color: #fff; background: #1f2937; transform: translateY(-1px); }

/* Ads */
.bf-ad { margin: 20px auto; text-align: center; }
.bf-ad-inner { min-height: 88px; display: grid; place-items: center; background: #fff; border: 1px dashed #d1d7e4; border-radius: 16px; overflow: hidden; color: var(--bf-muted); }
.bf-ad-label { display: block; margin-bottom: 6px; color: #9aa3b6; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.bf-ad-inner:empty::before { content: "Advertisement"; color: #a5adbd; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.bf-ad img, .bf-ad iframe, .bf-ad ins { max-width: 100%; }
.bf-feed-ad { grid-column: 1 / -1; }

/* Hero */
.bf-hero { padding: 38px 0 28px; }
.bf-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
  gap: 24px;
  align-items: center;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,122,26,.16), transparent 36%),
    linear-gradient(135deg, #ffffff 0%, #f9fbff 100%);
  border: 1px solid var(--bf-border);
  border-radius: 34px;
  padding: clamp(24px, 4vw, 48px);
  box-shadow: var(--bf-shadow);
  overflow: hidden;
  position: relative;
}
.bf-hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: #fff4ea; color: #bf4d00; font-weight: 900; font-size: 13px; margin-bottom: 14px; }
.bf-hero-title { margin: 0; font-size: clamp(34px, 5vw, 64px); line-height: .98; letter-spacing: -.065em; font-weight: 950; }
.bf-hero-text { margin: 18px 0 0; color: var(--bf-muted); max-width: 680px; font-size: clamp(16px, 1.7vw, 19px); }
.bf-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.bf-btn, .bf-button, .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  min-height: 46px;
  padding: 12px 18px;
  background: var(--bf-primary);
  color: #111827;
  font-weight: 950;
  box-shadow: 0 12px 22px rgba(255,122,26,.24);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.bf-btn:hover, .bf-button:hover, .wp-block-button__link:hover { transform: translateY(-2px); color: #111827; background: #ff8b38; box-shadow: 0 15px 26px rgba(255,122,26,.3); }
.bf-btn-dark { background: var(--bf-dark); color: #fff; box-shadow: 0 12px 24px rgba(15, 23, 42, .20); }
.bf-btn-dark:hover { color: #fff; background: #1e293b; }
.bf-hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.bf-stat { background: #fff; border: 1px solid var(--bf-border); border-radius: 22px; padding: 18px; box-shadow: var(--bf-shadow-soft); }
.bf-stat strong { display: block; font-size: 30px; letter-spacing: -.04em; }
.bf-stat span { display: block; color: var(--bf-muted); font-size: 13px; font-weight: 750; }

/* Layout */
.bf-main { padding-bottom: 48px; }
.bf-page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.bf-section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 12px 0 18px; }
.bf-section-title { margin: 0; font-size: clamp(24px, 3vw, 38px); line-height: 1.05; letter-spacing: -.045em; }
.bf-section-subtitle { margin: 8px 0 0; color: var(--bf-muted); }
.bf-filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 24px; }
.bf-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--bf-border); color: #334155; padding: 9px 12px; border-radius: 999px; font-size: 13px; font-weight: 850; }
.bf-chip:hover { border-color: #ffc08a; color: var(--bf-primary-dark); }

/* Product cards */
.bf-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.bf-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bf-surface);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius);
  overflow: hidden;
  box-shadow: var(--bf-shadow-soft);
  min-height: 100%;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.bf-product-card:hover { transform: translateY(-4px); border-color: #ffc08a; box-shadow: 0 20px 42px rgba(15, 23, 42, .12); }
.bf-product-media { display: block; position: relative; aspect-ratio: 1 / .82; background: #fff; overflow: hidden; border-bottom: 1px solid var(--bf-border); }
.bf-product-media img { width: 100%; height: 100%; object-fit: contain; padding: 18px; transition: transform .25s ease; }
.bf-product-card:hover .bf-product-media img { transform: scale(1.035); }
.bf-badge { position: absolute; top: 14px; left: 14px; z-index: 2; display: inline-flex; align-items: center; min-height: 28px; padding: 6px 10px; border-radius: 999px; background: rgba(15,23,42,.92); color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; }
.bf-product-body { display: flex; flex-direction: column; gap: 12px; padding: 18px; flex: 1; }
.bf-product-title { margin: 0; font-size: 17px; line-height: 1.25; letter-spacing: -.025em; font-weight: 900; }
.bf-product-title a { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bf-product-title a:hover { color: var(--bf-primary-dark); }
.bf-product-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--bf-muted); font-size: 12px; font-weight: 800; }
.bf-product-meta span { background: var(--bf-surface-2); border-radius: 999px; padding: 5px 8px; }
.bf-price-row { display: flex; justify-content: space-between; align-items: end; gap: 10px; margin-top: auto; }
.bf-price { display: grid; gap: 2px; }
.bf-price-label { color: var(--bf-muted); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.bf-price-value { font-size: 22px; font-weight: 950; letter-spacing: -.04em; color: var(--bf-dark); }
.bf-commission { color: var(--bf-success); font-size: 12px; font-weight: 900; }
.bf-card-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 2px; }
.bf-card-link { justify-self: start; display: inline-flex; align-items: center; color: var(--bf-muted); font-weight: 850; font-size: 13px; }
.bf-amazon-button { min-height: 42px; padding: 10px 14px; font-size: 13px; color: #111827 !important; }

/* Sidebar */
.bf-sidebar { display: grid; gap: 18px; position: sticky; top: 96px; }
.bf-widget, .widget { background: #fff; border: 1px solid var(--bf-border); border-radius: var(--bf-radius); padding: 20px; box-shadow: var(--bf-shadow-soft); }
.bf-widget-title, .widget-title { margin: 0 0 14px; font-size: 18px; font-weight: 950; letter-spacing: -.03em; }
.widget ul { margin: 0; padding-left: 18px; }
.widget li { margin: 8px 0; }
.search-form { display: flex; gap: 8px; }
.search-field { width: 100%; min-height: 42px; border: 1px solid var(--bf-border); border-radius: 999px; padding: 9px 13px; outline: none; background: #fff; }
.search-field:focus { border-color: #ffb578; box-shadow: 0 0 0 4px rgba(255, 122, 26, .11); }
.search-submit { min-height: 42px; border: none; border-radius: 999px; padding: 9px 14px; background: var(--bf-dark); color: #fff; font-weight: 850; cursor: pointer; }
.bf-mini-products { display: grid; gap: 12px; }
.bf-mini-product { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.bf-mini-product img { width: 64px; height: 64px; object-fit: contain; background: #fff; border: 1px solid var(--bf-border); border-radius: 14px; padding: 6px; }
.bf-mini-product-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 850; font-size: 13px; line-height: 1.3; }
.bf-mini-product-price { display: block; color: var(--bf-primary-dark); font-size: 13px; font-weight: 950; margin-top: 2px; }

/* Single product */
.bf-single-wrap { padding-top: 28px; }
.bf-breadcrumb { color: var(--bf-muted); font-size: 13px; font-weight: 750; margin-bottom: 16px; }
.bf-breadcrumb a { color: var(--bf-muted); }
.bf-single-product {
  display: grid;
  grid-template-columns: minmax(300px, .92fr) minmax(0, 1.08fr);
  gap: clamp(22px, 4vw, 44px);
  background: #fff;
  border: 1px solid var(--bf-border);
  border-radius: 34px;
  padding: clamp(20px, 4vw, 40px);
  box-shadow: var(--bf-shadow);
}
.bf-single-media { background: linear-gradient(180deg, #fff, #fafafa); border: 1px solid var(--bf-border); border-radius: 28px; display: grid; place-items: center; min-height: 380px; overflow: hidden; }
.bf-single-media img { width: 100%; height: 100%; max-height: 560px; object-fit: contain; padding: clamp(18px, 4vw, 42px); }
.bf-single-info { display: flex; flex-direction: column; gap: 16px; }
.bf-single-title { margin: 0; font-size: clamp(28px, 4.8vw, 48px); line-height: 1.05; letter-spacing: -.055em; font-weight: 950; }
.bf-disclosure { color: var(--bf-muted); font-size: 13px; background: #f8fafc; border: 1px solid var(--bf-border); border-radius: 16px; padding: 12px 14px; }
.bf-single-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.bf-single-price-value { font-size: clamp(32px, 4vw, 44px); font-weight: 950; letter-spacing: -.06em; }
.bf-single-commission { color: var(--bf-success); font-weight: 950; background: #eaf8ef; border-radius: 999px; padding: 6px 10px; }
.bf-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bf-detail { background: var(--bf-surface-2); border-radius: 18px; padding: 12px 14px; min-width: 0; }
.bf-detail span { display: block; color: var(--bf-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; font-weight: 900; margin-bottom: 2px; }
.bf-detail strong { display: block; font-weight: 950; overflow-wrap: anywhere; }
.bf-single-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.bf-single-actions .bf-btn { min-height: 54px; padding: 14px 24px; font-size: 16px; }
.bf-product-note { color: var(--bf-muted); font-size: 13px; }
.bf-content-card { margin-top: 28px; background: #fff; border: 1px solid var(--bf-border); border-radius: 28px; padding: clamp(20px, 3vw, 34px); box-shadow: var(--bf-shadow-soft); }
.bf-content-card h2, .bf-content-card h3 { letter-spacing: -.035em; }

/* Blog fallback */
.bf-entry-card { background: #fff; border: 1px solid var(--bf-border); border-radius: var(--bf-radius); padding: 24px; box-shadow: var(--bf-shadow-soft); }
.bf-entry-card + .bf-entry-card { margin-top: 18px; }
.bf-entry-title { margin: 0 0 10px; font-size: 24px; line-height: 1.2; letter-spacing: -.04em; }
.bf-entry-meta { color: var(--bf-muted); font-size: 13px; font-weight: 700; }
.bf-entry-content { margin-top: 16px; }
.bf-entry-content a { color: var(--bf-primary-dark); text-decoration: underline; }

/* Pagination */
.bf-pagination { margin: 30px 0 0; }
.bf-pagination .nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.bf-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--bf-border); background: #fff; font-weight: 850; padding: 0 12px; }
.bf-pagination .current { background: var(--bf-dark); color: #fff; border-color: var(--bf-dark); }

/* Footer */
.bf-site-footer { margin-top: 40px; padding: 34px 0; background: #0b1220; color: #dbe4f0; }
.bf-footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.bf-footer-title { font-size: 22px; font-weight: 950; letter-spacing: -.04em; }
.bf-footer-text { color: #a7b3c7; margin-top: 6px; }
.bf-footer-menu { list-style: none; display: flex; gap: 12px; margin: 0; padding: 0; flex-wrap: wrap; justify-content: flex-end; }
.bf-footer-menu a { color: #dbe4f0; font-weight: 800; font-size: 14px; }
.bf-footer-menu a:hover { color: #ffb578; }

/* Utilities */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.bf-empty { background: #fff; border: 1px solid var(--bf-border); border-radius: var(--bf-radius); padding: 28px; text-align: center; color: var(--bf-muted); }

@media (max-width: 1080px) {
  .bf-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bf-page-grid { grid-template-columns: minmax(0, 1fr); }
  .bf-sidebar { position: static; }
}
@media (max-width: 860px) {
  .bf-topbar { min-height: auto; padding: 14px 0; align-items: flex-start; }
  .bf-nav-wrap { flex-direction: column; align-items: flex-end; gap: 10px; }
  .bf-main-menu { justify-content: flex-end; }
  .bf-header-cta { display: none; }
  .bf-hero-card { grid-template-columns: 1fr; }
  .bf-single-product { grid-template-columns: 1fr; }
  .bf-single-media { min-height: 300px; }
}
@media (max-width: 640px) {
  .bf-container { width: min(calc(100% - 24px), var(--bf-container)); }
  .bf-topbar { display: grid; }
  .bf-nav-wrap { align-items: stretch; }
  .bf-main-menu { gap: 4px; justify-content: flex-start; }
  .bf-main-menu a { padding: 8px 10px; font-size: 13px; }
  .bf-product-grid { grid-template-columns: 1fr; }
  .bf-section-head { display: grid; }
  .bf-hero { padding-top: 20px; }
  .bf-hero-card { border-radius: 26px; }
  .bf-hero-stats { grid-template-columns: 1fr; }
  .bf-detail-grid { grid-template-columns: 1fr; }
  .bf-footer-grid { grid-template-columns: 1fr; }
  .bf-footer-menu { justify-content: flex-start; }
}
