/*
Theme Name: Shop Bin Finder Theme
Theme URI: https://github.com/coldfirezz/Theme
Author: Tony / SBF
Version: 1.2.0
Description: App-style WordPress theme for SBF / Shop Bin Finder UI.
Text Domain: shop-bin-finder-theme
*/

/* -------------------------
   Global / Base
-------------------------- */

:root{
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0b1220;
  --accent: #f6d96b;
  --accent-dark: #b08900;

  --radius-xl: 20px;
  --radius-2xl: 24px;
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 12px 40px rgba(15, 23, 42, 0.10);

  /* Header layout + container */
  --sbf-header-h: 65px;
  --sbf-content-gap: 0px;
  --sbf-header-offset: calc(var(--sbf-header-h) + var(--sbf-content-gap));      /* matches h-20 */
  --sbf-container: 80rem;    /* ~max-w-7xl */
  --sbf-pad-x: 16px;
}

/* CRITICAL: kill horizontal scroll (WP/themes/plugins love causing it) */
html, body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }
*, *::before, *::after { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }

/* Keep app container from causing sideways scroll */
#app,
.sbftheme-app,
#page,
#content,
.site {
  max-width: 100%;
  overflow-x: hidden;
}

body.sbftheme-body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  overflow-x: hidden; /* prevents left-right page drift */
}

img{ max-width:100%; height:auto; }

/* App wrapper */
.sbftheme-app{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  overflow: visible; /* ensure wrapper doesn't become a sticky-breaking scroll container */
}

/* -------------------------
   Header (FIXED)
   Bulletproof "always on top"
-------------------------- */

@media (min-width: 640px){
  :root{ --sbf-pad-x: 24px; }
}
@media (min-width: 1024px){
  :root{ --sbf-pad-x: 32px; }
}

.sbftheme-header{
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;

  z-index: 9999;
  border-bottom: 1px solid #eef2f7;
}

/* If WP admin bar is visible, push header down */
body.admin-bar .sbftheme-header{ top: 32px; }
@media (max-width: 782px){
  body.admin-bar .sbftheme-header{ top: 46px; }
}

/* Constrain header content to the site container width */
.sbftheme-header__inner{
  max-width: var(--sbf-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--sbf-pad-x);
  padding-right: var(--sbf-pad-x);
}

.sbftheme-header__row{
  height: var(--sbf-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Push the entire page below the fixed header */
body.sbftheme-body{
  padding-top: var(--sbf-header-offset);
}

body.sbftheme-body .sbftheme-main{
  padding-top: 0;
}

/* Keep the first visible content from adding an extra visual gap */
body.sbftheme-body .sbftheme-main > :first-child,
body.sbftheme-body .sbftheme-main > .sbftheme-contentWrap:first-child,
body.sbftheme-body .sbftheme-main > .sbftheme-frontPage:first-child,
body.sbftheme-body .sbftheme-main > .sbftheme-appTemplate:first-child{
  margin-top: 0 !important;
}

/* Theme-owned page wrappers */
.sbftheme-contentWrap,
.sbftheme-frontPage,
.sbftheme-appTemplate{
  width: 100%;
  max-width: var(--sbf-container);
  margin: 0 auto;
  padding-left: var(--sbf-pad-x);
  padding-right: var(--sbf-pad-x);
}

/* Prevent first child margin collapse from making content start too low */
.sbftheme-contentWrap > :first-child,
.sbftheme-frontPage > :first-child,
.sbftheme-appTemplate > :first-child{
  margin-top: 0 !important;
}

body.admin-bar.sbftheme-body{
  padding-top: calc(var(--sbf-header-offset));
}
@media (max-width: 782px){
  body.admin-bar.sbftheme-body{
    padding-top: calc(var(--sbf-header-offset));
  }
}

.sbftheme-brand{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sbftheme-brand .custom-logo-link img{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  display:block;
}

.sbftheme-logo-fallback{
  width: 40px;
  height: 40px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 12px;
  background: var(--accent);
  color: var(--primary);
  font-weight: 900;
}

.sbftheme-siteTitleWrap{
  margin: 0;
  font-size: 18px; /* ~text-lg */
  font-weight: 800;
  line-height: 1.1;
}

.sbftheme-siteTitle{
  text-decoration:none;
  color: var(--primary);
}

.sbftheme-siteDesc{
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* Desktop nav hidden on mobile */
.sbftheme-headerNav{ display: none; }
@media (min-width: 768px){
  .sbftheme-headerNav{
    display: flex;
    align-items: center;
  }
}

/* Remove menu dots + default UL styling in nav menus */
.sbftheme-navList,
.sbftheme-navList ul,
.sbftheme-mobileNavList,
.sbftheme-mobileNavList ul{
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.sbftheme-navList{
  display:flex;
  gap: 28px;
  align-items: center;
}

.sbftheme-navList li{ margin: 0; padding: 0; }

.sbftheme-navList a{
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 2px;
}

.sbftheme-navList a:hover{
  color: var(--primary);
}

/* Controls */
.sbftheme-userControls{
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons should not randomly get borders on other templates */
.sbftheme-userControls button,
.sbftheme-userControls a{
  border: 0 !important;
  outline: none !important;
}

/* Icon buttons (notifications + menu) */
.sbftheme-iconBtn{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f9fafb; /* ~gray-50 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  transition: background-color .15s ease;
}
.sbftheme-iconBtn:hover{ background: #f3f4f6; } /* ~gray-100 */

/* Notifications should always be visible when injected */
.sbftheme-iconBtn--notifications{ display: inline-flex; }

/* Menu hidden on desktop */
.sbftheme-iconBtn--menu{ display: inline-flex; }
@media (min-width: 768px){
  .sbftheme-iconBtn--menu{ display: none; }
}

/* Account chip */
.sbftheme-accountChip{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 12px;
  background: #f9fafb;
  transition: background-color .15s ease;
}
.sbftheme-accountChip:hover{ background: #f3f4f6; }
.sbftheme-loginDropdownWrap{
  position: relative;
}

.sbftheme-accountChip--button{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #111827;
  font: inherit;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.sbftheme-accountChip--button:hover{
  background: #e5e7eb;
  border-color: #cbd5e1;
  color: #111827;
}

.sbftheme-accountChip--button .sbftheme-accountText,
.sbftheme-accountChip--button .sbftheme-accountName,
.sbftheme-accountChip--button .sbftheme-icon{
  color: #111827;
}

.sbftheme-accountChip--button:hover{
  background: #e5e7eb;
}

.sbftheme-loginMenu{
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  padding: 16px;
  z-index: 10020;
}

.sbftheme-loginMenu form{
  display: grid;
  gap: 12px;
  margin: 0;
}

.sbftheme-loginMenu p{
  margin: 0;
}

.sbftheme-loginMenu label{
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.sbftheme-loginMenu input[type="text"],
.sbftheme-loginMenu input[type="email"],
.sbftheme-loginMenu input[type="password"]{
  width: 100%;
  height: 44px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}

.sbftheme-loginMenu input[type="submit"]{
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.sbftheme-loginMenu .login-remember{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.sbftheme-loginMenu .login-remember input{
  width: auto;
  height: auto;
  margin: 0;
}

.sbftheme-loginLinks{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
}

.sbftheme-loginLinks a{
  color: var(--muted);
  text-decoration: none;
}

.sbftheme-loginLinks a:hover{
  color: var(--primary);
}

@media (max-width: 640px){
  .sbftheme-loginMenu{
    width: min(320px, calc(100vw - 32px));
    right: 0;
  }
}
/* Avatar */
.sbftheme-techAvatar{
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow:hidden;
}

.sbftheme-techAvatarImg{
  width: 100%;
  height: 100%;
  max-width: 32px;
  max-height: 32px;
  object-fit: cover;
  border-radius: 0;
  display:block;
}

/* Hide account text on small screens */
.sbftheme-accountText{ display: none; }
@media (min-width: 640px){
  .sbftheme-accountText{
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.05;
  }
}

.sbftheme-accountName{
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}
.sbftheme-accountRole{
  font-size: 12px;
  color: var(--muted);
}


/* -------------------------
   Content / page primitives
-------------------------- */

.sbftheme-pageHeader{
  margin: 0 0 16px;
}

.sbftheme-pageTitle{
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--primary);
}

.sbftheme-pageHeader > .sbftheme-pageTitle{
  margin-bottom: 0;
}

.sbftheme-pageSubtext{
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.sbftheme-entryCard{
  margin-bottom: 24px;
}

.sbftheme-entryTitle{
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--primary);
}

.sbftheme-entryTitle a{
  color: inherit;
  text-decoration: none;
}

.sbftheme-entryTitle a:hover{
  text-decoration: underline;
}

.entry-content > :first-child{
  margin-top: 0;
}

/* -------------------------
   Main
-------------------------- */

.sbftheme-main{
  width:100%;
  flex: 1 0 auto;
}

/* Minimal utility-ish helpers used in templates (kept for other pages that still use them) */
.max-w-7xl{ max-width: 80rem; }
.mx-auto{ margin-left:auto; margin-right:auto; }
.px-4{ padding-left:16px; padding-right:16px; }
@media (min-width:640px){ .sm\:px-6{ padding-left:24px; padding-right:24px; } }
@media (min-width:1024px){ .lg\:px-8{ padding-left:32px; padding-right:32px; } }

/* =========================
   Footer (theme-owned styles)
   Ensures footer looks identical on ALL pages (not dependent on plugin CSS)
   ========================= */

.sbftheme-footer{
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 48px 0;
  margin-top: auto;
}

.sbftheme-footer__inner{
  max-width: 80rem; /* ~max-w-7xl */
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

@media (min-width: 640px){
  .sbftheme-footer__inner{ padding-left: 24px; padding-right: 24px; }
}

@media (min-width: 1024px){
  .sbftheme-footer__inner{ padding-left: 32px; padding-right: 32px; }
}

.sbftheme-footer__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

@media (min-width: 768px){
  .sbftheme-footer__grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.sbftheme-footer__brand{
  grid-column: 1 / -1;
}
@media (min-width: 768px){
  .sbftheme-footer__brand{ grid-column: span 1 / span 1; }
}

.sbftheme-footer__brandRow{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.sbftheme-footer__brandIcon{
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.sbftheme-footer__brandName{
  font-weight: 800;
  font-size: 18px;
  color: var(--primary);
}

.sbftheme-footer__desc{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  max-width: 34ch;
}

.sbftheme-footer__title{
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 12px 0;
}

.sbftheme-footer__list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.sbftheme-footer__list a{
  color: var(--muted);
  text-decoration: none;
}

.sbftheme-footer__list a:hover{
  color: var(--primary);
}

.sbftheme-footer__statusRow{
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.sbftheme-footer__dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  flex: 0 0 auto;
}

.sbftheme-footer__ver{
  color: #9ca3af;
  font-size: 12px;
  margin-top: 16px;
}

.sbftheme-footer__bottom{
  border-top: 1px solid #f3f4f6;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 640px){
  .sbftheme-footer__bottom{ flex-direction: row; }
}

.sbftheme-footer__copyright{
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* Footer: kill bullets everywhere (some pages/plugins re-add ul list-style) */
.sbftheme-footer ul,
.sbftheme-footer ol,
.sbftheme-footer li{
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.sbftheme-footer li::marker{
  content: "" !important;
}


/* Header notifications */
.sbftheme-headerNotificationsSlot{
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.sbftheme-headerNotifications{
  position: relative;
  display: inline-flex;
  align-items: center;
}

.sbftheme-notificationBadge{
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.sbftheme-notificationMenu{
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  max-height: min(70vh, 480px);
  overflow: auto;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
  padding: 10px;
  z-index: 10030;
}

.sbftheme-notificationItem,
.sbftheme-notificationEmpty{
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
}

.sbftheme-notificationItem{
  text-decoration: none;
  color: inherit;
}

.sbftheme-notificationItem:hover{
  background: #f8fafc;
}

.sbftheme-notificationItem__title,
.sbftheme-notificationItem__body{
  display: block;
}

.sbftheme-notificationItem__title{
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--primary);
}

.sbftheme-notificationItem__body,
.sbftheme-notificationEmpty{
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
}

.sbftheme-accountChip .sbftheme-icon{
  font-size: 16px;
  line-height: 1;
}

/* Added sbftheme aliases for current template markup */
.sbftheme-brandText{min-width:0;}
.sbftheme-logo,.sbftheme-footer__logo{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;}
.sbftheme-logo--custom .custom-logo-link,
.sbftheme-footer__logo--custom .custom-logo-link{display:inline-flex;line-height:0;}
.sbftheme-logo--custom img,
.sbftheme-footer__logo--custom img{width:40px;height:40px;border-radius:12px;object-fit:cover;display:block;}
.sbftheme-footer__menu,
.sbftheme-footer__menu ul{list-style:none !important;padding:0 !important;margin:0 !important;}
.sbftheme-footer__menu li{margin:0;padding:0;}
.sbftheme-footer__menu a{text-decoration:none;color:inherit;}
.sbftheme-footer__status{display:grid;gap:10px;}
.sbftheme-footer__version{font-size:12px;color:var(--muted);margin:0;}
.sbftheme-mobileMenu{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:40;display:none;}
.sbftheme-mobileMenu.is-open{display:block;}
.sbftheme-mobileMenu__panel{background:#fff;height:100%;width:min(20rem,100%);margin-left:auto;padding:24px;}
.sbftheme-mobileMenu__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:2rem;}
.sbftheme-mobileMenu__title{margin:0;font-size:1.125rem;font-weight:700;}
.sbftheme-mobileMenu__close{width:40px;height:40px;border-radius:12px;background:#f9fafb;display:inline-flex;align-items:center;justify-content:center;border:0;cursor:pointer;}
