/*
Theme Name:  SMJ Marketplace Theme
Theme URI:   https://smjautomobiles.com
Description: Minimal standalone theme bundled with SMJ Marketplace Pro. Provides the HTML shell (doctype, head, body) so the plugin works without any third-party theme. All design is handled by the plugin's own CSS.
Author:      SMJ Automobiles
Version:     1.0.0
License:     GPL-2.0+
Text Domain: smj-marketplace
*/

/* ── Base reset ── */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-family: var(--smj-body-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--smj-bg, #FFFFFF);
    color: var(--smj-text-primary, #23262F);
    font-family: var(--smj-body-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--smj-heading-font, 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    color: var(--smj-text-primary, #23262F);
}

/* Push footer to bottom */
.smj-theme-main {
    flex: 1 0 auto;
}

/* ── Page content wrapper ── */
/* Prevents content from bleeding to the viewport edge on pages that don't
   use the plugin's own shortcode wrappers (e.g. Privacy Policy, plain pages) */
.smj-page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    width: 100%;
}
@media (max-width: 600px) {
    .smj-page-content { padding: 20px 16px 32px; }
}

/* ── Elementor remnant suppression ────────────────────────────────────────────
   Kill any oversized SVG icons left behind after Elementor/ElementsKit removal.
   These render as full-viewport black blobs because Elementor sized them via
   its own CSS (now gone). We constrain ALL SVGs that aren't inside known plugin
   wrappers to a safe max size.                                                 */

/* Global SVG safety net — icon SVGs should never fill the page */
body > svg,
.entry-content svg:not([width]):not([height]),
.smj-page-content svg:not([width]):not([height]),
.elementor svg,
.elementor-widget svg,
.ekit-widget-content svg,
.ekit svg {
    max-width: 24px !important;
    max-height: 24px !important;
    width: 1em !important;
    height: 1em !important;
    display: inline-block !important;
    vertical-align: middle;
}

/* Allow full-size SVGs inside plugin's own components */
.smj-hdr svg,
.smj-ftr svg,
.smj-sl-wrap svg,
.smj-card svg,
.smj-modal svg,
.smj-grid svg,
.smj-wrap svg {
    max-width: none !important;
    max-height: none !important;
    width: unset !important;
    height: unset !important;
}

/* Hide leftover Elementor section/widget wrappers that render as blank space */
.elementor-section-wrap:empty,
.elementor-column-wrap:empty,
.elementor-widget-wrap:empty,
.e-con:empty,
.e-con-inner:empty {
    display: none !important;
}

/* Strip Elementor header/footer templates from page content area */
.elementor-template-canvas .smj-hdr,
.elementor-template-canvas .smj-ftr {
    display: none !important;
}

/* Account for sticky header height */
.smj-theme-main { padding-top: 0; }

/* Admin bar offset for sticky header */
body.admin-bar .smj-hdr { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .smj-hdr { top: 46px; }
}

/* ── Base link / image defaults ── */
a { color: var(--smj-secondary, #0070F3); text-decoration: none; }
a:hover { color: var(--smj-secondary-hover, #0058c4); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* WP alignment classes */
.alignleft  { float: left;  margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin: 0 auto 1em; }

/* Screen-reader text */
.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;
}
