/**
 * WFI 2026 — base theme tokens, typography, and general UI
 */

:root {
    /* Brand */
    --wfi-orange: #d3612b;
    --wfi-orange-hover: #c0551c;
    --wfi-black: #111111;
    --wfi-text: #1a1a1a;
    --wfi-text-muted: #5c5c5c;
    --wfi-border: #e8e8e8;
    --wfi-bg: #ffffff;
    --wfi-bg-soft: #f7f7f7;

    /* Type */
    --wfi-font-display: "Sora", sans-serif;
    --wfi-font-body: "Inter", sans-serif;

    /* Layout */
    --wfi-container: 1280px;
    --wfi-gutter: 1.25rem;
    --wfi-radius: 8px;
    --wfi-radius-pill: 999px;
    --wfi-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

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

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

body {
    margin: 0;
    font-family: var(--wfi-font-body);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--wfi-text);
    background: var(--wfi-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

a {
    color: var(--wfi-orange);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--wfi-orange-hover);
}

p {
    margin: 0 0 1rem;
    font-family: var(--wfi-font-body);
    font-weight: 400;
}

p.lead,
.text-light,
.font-light {
    font-weight: 300;
}

ul,
ol {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    font-family: var(--wfi-font-body);
    font-weight: 400;
}

li {
    margin-bottom: 0.35rem;
}

strong,
b {
    font-family: var(--wfi-font-display);
    font-weight: 600;
}

/* Headings — Sora (extra weight) */
h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6 {
    font-family: var(--wfi-font-display);
    color: var(--wfi-black);
    line-height: 1.2;
    margin: 0 0 0.75em;
    letter-spacing: -0.02em;
}

h1, .h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
}

h2, .h2 {
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 700;
}

h3, .h3 {
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 700;
}

h4, .h4 {
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    font-weight: 600;
}

h5, .h5 {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h6, .h6 {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

/* Magento / widget titles */
.page-title-wrapper .page-title,
.page-title span,
.block-title,
.block-title strong,
.widget-title,
.section-title,
.modal-title {
    font-family: var(--wfi-font-display);
    font-weight: 700;
}

.page-title-wrapper .page-title,
.page-title span {
    font-weight: 800;
}

/* ---------- Layout ---------- */
/*
 * Use overflow-x: clip (not hidden) on scroll ancestors.
 * overflow-x: hidden creates a scroll containment context and breaks
 * position: sticky on .wfi-site-header (and other sticky UI).
 * clip still prevents horizontal spill without killing sticky.
 */
html,
body {
    overflow-x: clip;
    max-width: 100%;
}

.container,
.page-main > .container,
.wfi-site-header .container,
.wfi-site-footer .container,
.wfi-site-footer__inner,
.wfi-home-partners__inner,
.wfi-home-hero__inner {
    width: 100%;
    max-width: var(--wfi-container);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--wfi-gutter);
    padding-right: var(--wfi-gutter);
    box-sizing: border-box;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    max-width: 100%;
}

/* Normalize Magento/Infortis page shells on ALL pages */
.main-container,
.main.container,
.inner-container,
.page-main,
.columns,
.column.main {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
    box-sizing: border-box;
}

.main.container,
.inner-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.page-main {
    flex: 1 0 auto;
    padding: 1.5rem 0 3rem;
}

/* Inner page content sits in the shared container */
.page-main .breadcrumbs,
.page-main .page-title-wrapper,
.page-main .columns .column.main > .block,
.cms-page-view .column.main > *:not(.wfi-home-hero):not(.wfi-home-partners),
.catalog-product-view .column.main,
.checkout-index-index .column.main,
.blog-page .column.main {
    /* keep readable content width via nested container where needed */
}

.page-main .breadcrumbs,
.page-main .page-title-wrapper {
    width: 100%;
    max-width: var(--wfi-container);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--wfi-gutter);
    padding-right: var(--wfi-gutter);
    box-sizing: border-box;
}

.cms-page-view:not(.cms-index-index) .column.main,
.blog-page .column.main,
.catalogsearch-result-index .column.main {
    width: 100%;
    max-width: var(--wfi-container);
    margin-left: auto !important;
    margin-right: auto !important;
    /* padding-left: var(--wfi-gutter);
    padding-right: var(--wfi-gutter); */
    box-sizing: border-box;
}

.columns {
    display: block;
}

/* Simple grid helpers (footer / CMS without Bootstrap) */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: calc(var(--wfi-gutter) * -0.5);
    margin-right: calc(var(--wfi-gutter) * -0.5);
}

.row > [class*="col-"] {
    padding-left: calc(var(--wfi-gutter) * 0.5);
    padding-right: calc(var(--wfi-gutter) * 0.5);
    width: 100%;
}

@media (min-width: 768px) {
    .col-md-4 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }

    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 992px) {
    .col-lg-4 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }

    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .text-lg-end {
        text-align: right;
    }

    .order-lg-0 {
        order: 0;
    }
}

.order-1 {
    order: 1;
}

.list-unstyled {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.list-inline {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.list-inline-item {
    display: inline-block;
    margin-right: 1rem;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-md-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.border-bottom { border-bottom: 1px solid var(--wfi-border); }
.border-2 { border-width: 2px; }
.border-dark { border-color: #222; }

/* ---------- Buttons ---------- */
.btn,
button.action.primary,
a.action.primary,
.wfi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--wfi-font-display);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    padding: 0.75rem 1.35rem;
    border-radius: var(--wfi-radius-pill);
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn-primary,
.action.primary,
.wfi-btn--primary {
    background: var(--wfi-orange);
    color: #fff !important;
}

.btn-primary:hover,
.action.primary:hover,
.wfi-btn--primary:hover {
    background: var(--wfi-orange-hover);
    color: #fff !important;
}

.btn-outline,
.wfi-btn--outline {
    background: transparent;
    color: var(--wfi-black) !important;
    box-shadow: inset 0 0 0 1.5px var(--wfi-border);
}

.btn-outline:hover,
.wfi-btn--outline:hover {
    box-shadow: inset 0 0 0 1.5px var(--wfi-orange);
    color: var(--wfi-orange) !important;
}

/* ---------- Forms (light defaults) ---------- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
    font-family: var(--wfi-font-body);
    font-weight: 400;
    font-size: 1rem;
    color: var(--wfi-text);
    background: #fff;
    border: 1px solid var(--wfi-border);
    border-radius: var(--wfi-radius);
    padding: 0.65rem 0.85rem;
    width: 100%;
    max-width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--wfi-orange);
    box-shadow: 0 0 0 3px rgba(212, 101, 39, 0.15);
}

label {
    font-family: var(--wfi-font-body);
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--wfi-text);
    display: inline-block;
    margin-bottom: 0.35rem;
}

/* Legacy .footer rules removed — see wfi-footer.css */

/* ---------- Messages / misc ---------- */
.message,
.messages .message {
    font-family: var(--wfi-font-body);
    font-weight: 400;
    padding: 0.85rem 1rem;
    border-radius: var(--wfi-radius);
    margin-bottom: 1rem;
}

.message-success { background: #eef8f0; color: #1e6b32; }
.message-error { background: #fdeeee; color: #a32020; }
.message-notice { background: #fff8ef; color: #8a4b12; }

/* Hide default Magento chrome already removed via layout, safety net */
.nav-sections,
.panel.wrapper,
.header.content > .block-search {
    /* left intentionally blank for overrides */
}
