/*
Theme Name:        Diglancers Marketplace Theme
Theme URI:         https://staging.diglancers.com
Author:            Diglancers
Author URI:        https://diglancers.com
Description:       Purpose-built classic WordPress theme for the Diglancers creator, community and campaign marketplace. Provides a clean, minimal shell — header, footer, and body — designed to work seamlessly with the Diglancers Marketplace plugin. All marketplace UI is handled by the plugin's scoped .dlm-app styles.
Version:           1.0.0
Requires at least: 6.2
Requires PHP:      8.1
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       diglancers-theme
Tags:              custom, marketplace, one-column

/*
 * ────────────────────────────────────────────────────────────────
 * GLOBAL RESET & BASE
 * The theme only sets the bare minimum. The Diglancers Marketplace
 * plugin ships its own scoped CSS (.dlm-app) for all marketplace
 * pages. This file handles everything OUTSIDE .dlm-app:
 *  - html/body reset
 *  - non-marketplace WordPress pages (WP admin bar offset, etc.)
 *  - WordPress alignment helpers
 * ────────────────────────────────────────────────────────────────
 */

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    padding: 0;
    background: #f7f6ed;
    color: #0d1f18;
    font-family: 'DM Sans', 'Roboto', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* Marketplace pages — cream background, no theme chrome */
body.dlm-marketplace-body {
    background: #f7f6ed;
}

/* WordPress admin bar offset */
.admin-bar body { padding-top: 0; }

/* Remove default list/link styles inside WordPress content areas */
a { color: #062a21; text-decoration: underline; }
a:hover { color: #041a14; }

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

/* ────────────────────────────────────────────────────────────────
 * SITE WRAPPER
 * Non-marketplace pages (privacy policy, terms, WP login, etc.)
 * use this simple centred layout.
 * ────────────────────────────────────────────────────────────────
 */
#dlm-site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#dlm-site-header {
    background: #062a21;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dlm-site-header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.dlm-site-header__logo img {
    height: 36px;
    width: auto;
}

.dlm-site-header__logo-text {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 900;
    font-size: 1.25rem;
    color: #d0ff59;
    letter-spacing: -0.025em;
    text-decoration: none;
}

.dlm-site-header__nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dlm-site-header__nav a {
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.dlm-site-header__nav a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.dlm-site-header__cta {
    display: inline-flex;
    align-items: center;
    background: #d0ff59;
    color: #231B0E;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 10px;
    text-decoration: none;
    min-height: 36px;
    transition: background 0.15s;
}

.dlm-site-header__cta:hover {
    background: #d4930f;
    color: #231B0E;
}

#dlm-site-content {
    flex: 1;
}

/* Non-marketplace page content */
.dlm-page-content {
    max-width: 800px;
    margin: 48px auto;
    padding: 0 24px;
}

.dlm-page-content h1 {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 800;
    color: #062a21;
    margin-bottom: 16px;
}

#dlm-site-footer {
    background: #062a21;
    color: rgba(255,255,255,0.65);
    padding: 32px 24px;
    text-align: center;
    font-size: 13px;
}

#dlm-site-footer a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
}

#dlm-site-footer a:hover { color: #d0ff59; }

.dlm-footer__inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dlm-footer__links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ────────────────────────────────────────────────────────────────
 * MARKETPLACE PAGES
 * When the Diglancers Marketplace plugin renders a page, it wraps
 * everything in .dlm-app. The theme header/footer are suppressed
 * inside those templates — the plugin renders its own nav.
 * ────────────────────────────────────────────────────────────────
 */
body.dlm-marketplace-page #dlm-site-header,
body.dlm-marketplace-page #dlm-site-footer {
    display: none;
}

body.dlm-marketplace-page #dlm-site-content {
    padding: 0;
}

/* ────────────────────────────────────────────────────────────────
 * WP ADMIN BAR
 * ────────────────────────────────────────────────────────────────
 */
.admin-bar #dlm-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar #dlm-site-header { top: 46px; } }

/* ────────────────────────────────────────────────────────────────
 * RESPONSIVE
 * ────────────────────────────────────────────────────────────────
 */
@media (max-width: 719px) {
    #dlm-site-header { height: 56px; padding: 0 16px; }
    .dlm-site-header__nav { display: none; }
    .dlm-page-content { margin: 32px auto; }
}
