/*
Theme Name: F3D Minimal
Theme URI: https://example.com/
Author: F3D
Author URI: https://example.com/
Description: A lightweight responsive WordPress theme designed to work cleanly with the F3D Marketplace plugin templates on desktop and mobile.
Version: 1.1.3
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: f3d-minimal
*/

/*
  Theme CSS intentionally avoids global form-control styling so plugin UI
  (including .f3d-searchbar) remains consistent across browsers.
*/

:root{
  --f3d-bg: #ffffff;
  --f3d-text: #111111;
  --f3d-muted: #5a5a5a;
  --f3d-border: #e7e7e7;
  --f3d-surface: #ffffff;
  --f3d-surface-2: #f6f6f6;
  --f3d-radius: 18px;
  --f3d-shadow: 0 8px 24px rgba(0,0,0,.04);
  --f3d-max: 1600px;
  --f3d-gutter: 18px;
  /* Default logo heights (can be overridden by Customizer controls via inline CSS). */
  --f3d-logo-h: 44px;
  --f3d-logo-h-mobile: 36px;
  /* Top background band defaults (values are injected via inline CSS when enabled). */
  --f3d-topband-h: 0px;
  --f3d-topband-color: transparent;
  --f3d-topband-image: none;
  --f3d-topband-gradient: none;
}

/* Base */
*{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{
  margin: 0;
  background: var(--f3d-bg);
  color: var(--f3d-text);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  /* The plugin UI uses font-family: inherit, so the site's base font controls it. */
  line-height: 1.5;
}

/* Top Background Band */
body.f3d-topband--body{
  position: relative;
}
body.f3d-topband--body::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--f3d-topband-h);
  background-color: var(--f3d-topband-color);
  background-image: var(--f3d-topband-gradient), var(--f3d-topband-image);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  z-index: 0;
  pointer-events: none;
}
body.f3d-topband--body .site-header,
body.f3d-topband--body .site-main,
body.f3d-topband--body .site-footer{
  position: relative;
  z-index: 1;
}

/* Auto mode: hide band if search bar is not present */
body.f3d-topband--auto-hidden.f3d-topband--body::before{
  height: 0 !important;
}
body.f3d-topband--auto-hidden.f3d-topband--main .site-main::before{
  height: 0 !important;
}

body.f3d-topband--main .site-main{
  position: relative;
  isolation: isolate;
}
body.f3d-topband--main .site-main::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--f3d-topband-h);
  background-color: var(--f3d-topband-color);
  background-image: var(--f3d-topband-gradient), var(--f3d-topband-image);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  z-index: -1;
  pointer-events: none;
}
img{ max-width: 100%; height: auto; }
a{ color: inherit; }

/* Layout */
.f3d-site{
  min-height: 100vh;
  display:flex;
  flex-direction: column;
}
.site-container{
  width: 100%;
  max-width: var(--f3d-max);
  margin: 0 auto;
  padding: 24px var(--f3d-gutter);
}
.site-main{
  flex: 1;
}

/* Header */
.site-header{
  border-bottom: 0px solid var(--f3d-border);
  background: var(--f3d-surface);
}

/* Optional: completely empty theme header (plugin renders its own header UI). */
.site-header.site-header--empty{
  border-bottom: 0 !important;
  background: transparent !important;
  height: 0px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.site-header .inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px var(--f3d-gutter);
  max-width: var(--f3d-max);
  margin: 0 auto;
}
.site-brand{
  display:flex;
  align-items:center;
  gap: 10px;
  text-decoration:none;
}
.site-logo{
  display:flex;
  align-items:center;
  line-height: 0;
  flex: 0 0 auto;
}
.site-logo .custom-logo-link{
  display:flex;
  align-items:center;
  margin: 0;
  line-height: 0;
}
.site-logo .custom-logo{
  display:block;
  width: auto !important;
  height: auto !important;
  max-height: var(--f3d-logo-h) !important;
  max-width: 100%;
}
.site-brand-text{ display:flex; flex-direction: column; }
.site-title-link{ text-decoration:none; display:inline-block; }

@media (max-width: 860px){
  .site-logo .custom-logo{ max-height: var(--f3d-logo-h-mobile) !important; }
}
.site-title{
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .2px;
}
.site-tagline{
  margin: 0;
  font-size: 12px;
  color: var(--f3d-muted);
}

/* Navigation */
.menu-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border: 1px solid var(--f3d-border);
  background: var(--f3d-surface);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  cursor:pointer;
}

.primary-nav{
  display:flex;
  align-items:center;
  gap: 12px;
}
.primary-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.primary-nav a{
  display:inline-block;
  text-decoration:none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 800;
  font-size: 13px;
}
.primary-nav a:hover{
  border-color: var(--f3d-border);
  background: var(--f3d-surface-2);
}

/* Mobile nav */
@media (max-width: 860px){
  .primary-nav{
    position: absolute;
    left: 0;
    right: 0;
    top: 60px;
    padding: 12px var(--f3d-gutter) 16px;
    background: var(--f3d-surface);
    border-bottom: 1px solid var(--f3d-border);
    display:none;
    z-index: 999;
  }
  .primary-nav.is-open{ display:block; }
  .primary-nav ul{ flex-direction: column; align-items:flex-start; }
}
@media (min-width: 861px){
  .menu-toggle{ display:none; }
}

/* Content */
.entry-title{
  margin: 0 0 12px;
  font-size: 32px;
  letter-spacing: .2px;
}
.entry-content > :first-child{ margin-top: 0; }
.entry-content > :last-child{ margin-bottom: 0; }

/* Cards for core content (does not target plugin templates) */
.content-card{
  border: 1px solid var(--f3d-border);
  border-radius: var(--f3d-radius);
  background: var(--f3d-surface);
  box-shadow: var(--f3d-shadow);
  padding: 18px;
}

/* Footer */
.site-footer{
  border-top: 0;
  background-color: #1e1e1e;
  background-image: var(--f3d-footer-bg-img, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
  min-height: 500px;
  height: 500px;
}
.site-footer .inner{
  max-width: var(--f3d-max);
  margin: 0 auto;
  padding: 70px var(--f3d-gutter) 44px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.site-footer-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.site-footer-right{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 34px;
}

.site-footer-columns{
  display: flex;
  gap: 80px;
  align-items: flex-start;
  justify-content: flex-end;
}

.site-footer-extra-row{
  display: flex;
  gap: 80px;
  align-items: flex-start;
  justify-content: flex-end;
}
.site-footer-col{
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.site-footer-col-title{
  color: rgba(255,255,255,.92);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .2px;
}

.site-footer-logo{
  display: flex;
  align-items: center;
  line-height: 0;
}
.site-footer-logo .custom-logo-link{
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.site-footer-logo .custom-logo{
  display: block;
  width: auto !important;
  height: auto !important;
  max-height: 60px !important;
  max-width: 320px;
}
.site-footer-custom-logo{
  display: block;
  width: auto;
  height: auto;
  max-height: 60px;
  max-width: 320px;
}
.site-footer-logo--text{
  line-height: 1;
}
.site-footer-logo-link{
  color: #ffffff;
  text-decoration: none;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .2px;
}

.site-footer-links{
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
}
.site-footer-link{
  color: rgba(255,255,255,.92);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
}
.site-footer-link:hover{
  text-decoration: underline;
}

.site-footer-bottom{
  margin-top: auto;
  padding-top: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-footer-bottom-text{
  color: rgba(255,255,255,.70);
  font-size: 13px;
  font-weight: 700;
}

.site-footer-social{
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.site-footer-social-link{
  color: rgba(255,255,255,.92);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.site-footer-social-link:hover{
  text-decoration: underline;
}
.site-footer-social-ic{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,.92);
}
.site-footer-social-text{ line-height: 1; }

@media (max-width: 860px){
  .site-footer{
    height: auto;
    min-height: 500px;
  }
  .site-footer-top{
    flex-direction: column;
    align-items: flex-start;
  }
  .site-footer-right{
    align-items: flex-start;
  }
  .site-footer-columns{
    flex-direction: column;
    gap: 28px;
  }
  .site-footer-extra-row{
    flex-direction: column;
    gap: 28px;
  }
}

/* Accessibility */
.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;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus{
  clip: auto !important;
  clip-path: none;
  display: block;
  height: auto;
  left: 5px;
  padding: 15px 23px 14px;
  top: 5px;
  width: auto;
  z-index: 100000;
  background: #fff;
  border: 1px solid var(--f3d-border);
  border-radius: 12px;
}