/*
Theme Name: Junaid Finds
Theme URI: https://example.com/
Author: OpenAI
Description: A minimalist, search-first affiliate storefront for Instagram traffic. Requires the Junaid Finds Products companion plugin for product management.
Version: 1.6.0
License: GPL-2.0-or-later
Text Domain: junaid-finds
*/

:root {
  --jf-bg: #fff8d9;
  --jf-bg-soft: #fffdf1;
  --jf-surface: #ffffff;
  --jf-surface-2: #fff4b0;
  --jf-text: #2d2508;
  --jf-muted: #7b6d39;
  --jf-line: #f1df80;
  --jf-accent: #ffd84d;
  --jf-accent-strong: #f2bf00;
  --jf-accent-text: #2b2307;
  --jf-radius: 28px;
  --jf-radius-small: 18px;
  --jf-shadow: 0 16px 42px rgba(147, 108, 0, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 230, 125, .45), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 214, 58, .28), transparent 24%),
    var(--jf-bg);
  color: var(--jf-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }

.jf-site { min-height: 100vh; }
.jf-wrap { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }

.jf-header { padding: 26px 0 12px; }
.jf-header .jf-wrap { display: flex; align-items: center; }
.jf-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}
.jf-brand .jf-logo { display: block; height: 48px; width: auto; max-width: 100%; object-fit: contain; }
.jf-brand-text { font-size: 24px; line-height: 1; font-weight: 900; letter-spacing: -.85px; }

.jf-hero { padding: 24px 0 26px; }
.jf-hero .jf-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff7cf 0%, #ffe164 100%);
  border: 1px solid rgba(242, 191, 0, .35);
  border-radius: 36px;
  padding: 38px;
  box-shadow: var(--jf-shadow);
}
.jf-hero .jf-wrap::before,
.jf-hero .jf-wrap::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.34);
}
.jf-hero .jf-wrap::before { width: 190px; height: 190px; top: -40px; right: -22px; }
.jf-hero .jf-wrap::after { width: 120px; height: 120px; bottom: -34px; left: 28px; background: rgba(255, 246, 200, .55); }
.jf-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 0 10px;
  font-size: clamp(31px, 5vw, 52px);
  line-height: .98;
  letter-spacing: -2px;
}
.jf-hero p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #5f531e;
  font-size: 16px;
}

.jf-search-area {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 16px 0 18px;
  background: linear-gradient(to bottom, rgba(255,248,217,.94) 75%, rgba(255,248,217,0));
  backdrop-filter: blur(10px);
}
.jf-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 18px;
  background: rgba(255,255,255,.9);
  border: 1px solid #f0de7e;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(147, 108, 0, .08);
}
.jf-search-icon { flex: 0 0 auto; width: 20px; height: 20px; color: var(--jf-muted); }
.jf-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--jf-text); font-size: 16px; padding: 10px 0; }
.jf-search input::placeholder { color: #a08f53; }
.jf-search-clear { border: 0; background: transparent; color: var(--jf-muted); padding: 8px; cursor: pointer; font-weight: 700; display: none; }
.jf-search-clear.is-visible { display: block; }

.jf-count { margin: 4px 4px 16px; color: var(--jf-muted); font-size: 14px; }
.jf-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding-bottom: 38px; }
.jf-product {
  min-width: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fffdf5 100%);
  border: 1px solid #f3e492;
  border-radius: var(--jf-radius);
  overflow: hidden;
  box-shadow: 0 4px 0 rgba(255,255,255,.45), 0 12px 28px rgba(147, 108, 0, .07);
  transition: transform .18s ease, box-shadow .18s ease;
}
.jf-product:hover { transform: translateY(-4px); box-shadow: var(--jf-shadow); }
.jf-product-media {
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at top, #fffdf2 0%, #fff0a9 100%);
  overflow: hidden;
  padding: 14px;
}
.jf-product-media img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--jf-radius) - 10px); }
.jf-product-body { padding: 14px; }
.jf-product-title { margin: 0 0 13px; font-size: 15px; line-height: 1.3; letter-spacing: -.22px; font-weight: 800; min-height: 39px; }
.jf-buy {
  display: block;
  width: 100%;
  border-radius: 999px;
  padding: 13px 12px;
  background: linear-gradient(180deg, var(--jf-accent) 0%, var(--jf-accent-strong) 100%);
  color: var(--jf-accent-text);
  text-align: center;
  font-size: 14px;
  line-height: 1;
  font-weight: 900;
  border: 1px solid rgba(214, 165, 0, .32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.48);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.jf-buy:hover { transform: translateY(-1px); filter: brightness(1.02); box-shadow: 0 8px 18px rgba(214, 165, 0, .18); }
.jf-empty {
  display: none;
  margin: 24px 0 50px;
  background: rgba(255,255,255,.8);
  border: 1px dashed #e3cf67;
  padding: 30px 20px;
  text-align: center;
  border-radius: var(--jf-radius);
  color: var(--jf-muted);
}
.jf-empty.is-visible { display: block; }

.jf-footer {
  border-top: 1px solid rgba(227, 207, 103, .7);
  padding: 22px 0 34px;
  color: var(--jf-muted);
  font-size: 12px;
  line-height: 1.5;
}
.jf-footer p { margin: 0; }

@media (max-width: 900px) {
  .jf-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .jf-wrap { width: min(100% - 24px, 1160px); }
  .jf-header { padding-top: 18px; }
  .jf-brand { padding: 0; min-height: 0; }
  .jf-brand .jf-logo { height: 42px; }
  .jf-hero { padding: 16px 0 20px; }
  .jf-hero .jf-wrap { padding: 26px 22px; border-radius: 28px; }
  .jf-hero h1 { font-size: 34px; letter-spacing: -1.3px; }
  .jf-hero p { font-size: 14px; }
  .jf-search-area { padding-bottom: 14px; }
  .jf-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .jf-product { border-radius: 22px; }
  .jf-product-media { padding: 10px; }
  .jf-product-body { padding: 11px; }
  .jf-product-title { font-size: 14px; min-height: 37px; margin-bottom: 11px; }
  .jf-buy { padding: 12px 8px; font-size: 12px; }
}

/* Social links below the header logo */
.jf-header .jf-wrap { flex-wrap: wrap; gap: 12px 14px; }
.jf-social { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.jf-social a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255, 219, 95, .95);
  color: #51451a;
  box-shadow: 0 6px 18px rgba(147, 108, 0, .06);
  font-size: 13px;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease;
}
.jf-social a:hover { transform: translateY(-2px); background: #fffdf4; }
.jf-social svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.jf-social a[aria-label="Facebook"] svg { fill: currentColor; stroke: none; }
@media (max-width: 620px) {
  .jf-social { gap: 7px; }
  .jf-social a { padding: 8px 11px; font-size: 12px; }
}


/* Centered top section */
.jf-header .jf-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.jf-social-block { width: 100%; }
.jf-social-label {
  margin: 4px 0 9px;
  color: var(--jf-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.jf-social { justify-content: center; }
.jf-hero .jf-wrap { text-align: center; }
.jf-hero h1 { margin-left: auto; margin-right: auto; }
.jf-hero p { max-width: 620px; margin-left: auto; margin-right: auto; }
.jf-search-area .jf-wrap { display: flex; justify-content: center; }
.jf-search { width: min(760px, 100%); }
.jf-count { text-align: center; }
