/* ==========================================================
   TOOLFLUENCY — GLOBAL PRODUCTION THEME
   Master CSS v1.0 (With Full Variable System)
   ========================================================== */


/* ==========================================================
   1) CSS VARIABLE SYSTEM (COLORS, SPACING, RADII, SHADOWS)
   ========================================================== */

:root {
    /* COLOR SYSTEM */
    --tf-bg: #f4f6f9;
    --tf-card: #ffffff;
    --tf-muted: #4a4a4a;
    --tf-border: #d8dce3;
    --tf-border-subtle: #e3e6ee;

    --tf-accent: #2563eb;
    --tf-accent-soft: #e0edff;
    --tf-accent-strong: #1d4ed8;

    --tf-danger: #b91c1c;
    --tf-warning: #b45309;
    --tf-success: #166534;

    --tf-input-bg: #f9fafb;
    --tf-input-border: #cbd5e1;
    --tf-input-focus: #2563eb;

    --tf-text-main: #111827;
    --tf-text-muted: #4b5563;
    --tf-text-soft: #6b7280;

    /* SPACING SYSTEM */
    --tf-space-xs: 4px;
    --tf-space-sm: 8px;
    --tf-space-md: 12px;
    --tf-space-lg: 16px;
    --tf-space-xl: 24px;
    --tf-space-xxl: 32px;
    --tf-space-xxxl: 40px;
    --tf-space-quad: 48px;
    --tf-space-xxxl-plus: 56px;

    /* RADIUS SYSTEM */
    --tf-radius-sm: 10px;
    --tf-radius-md: 14px;
    --tf-radius-lg: 16px;
    --tf-radius-xl: 20px;

    /* SHADOW SYSTEM */
    --tf-shadow-soft: 0 4px 14px rgba(0,0,0,0.06);
    --tf-shadow-card: 0 10px 28px rgba(0,0,0,0.10);
    --tf-shadow-hover: 0 8px 22px rgba(0,0,0,0.08);

    /* AD + LAYOUT SYSTEM */
    --tf-layout-max-width: 1180px;
    --tf-left-nav-width: 260px;
    --tf-page-padding-x: 24px;
    --tf-page-padding-y: 24px;
}

/* ==========================================================
   2) GLOBAL RESET
   ========================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--tf-text-main);
    background: var(--tf-bg);
}

body {
    min-height: 100vh;
}

/* Remove default margins on headings and paragraphs */
h1, h2, h3, h4, h5, h6,
p {
    margin: 0;
}

/* Basic links */
a {
    color: var(--tf-accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ==========================================================
   3) LAYOUT SHELL
   ========================================================== */

.layout {
    display: flex;
    max-width: var(--tf-layout-max-width);
    margin: 0 auto;
    padding: var(--tf-page-padding-y) var(--tf-page-padding-x);
    gap: 24px;
}

/* Left navigation rail */
.left-nav {
    width: var(--tf-left-nav-width);
    flex-shrink: 0;
}

/* Main content column */
.page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Footer */
.tf-footer {
    max-width: var(--tf-layout-max-width);
    margin: 0 auto 24px;
    padding: 16px 24px;
    border-top: 1px solid var(--tf-border-subtle);
    color: var(--tf-text-soft);
    font-size: 13px;
}

/* ==========================================================
   4) LEFT NAV STYLING
   ========================================================== */

.tf-logo-block {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tf-border-subtle);
}

.tf-logo-text {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tf-text-main);
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tf-text-soft);
    margin-bottom: 8px;
}

.nav-section a {
    display: block;
    font-size: 14px;
    padding: 6px 0;
    color: var(--tf-text-main);
}

.nav-section a:hover {
    color: var(--tf-accent-strong);
}

/* ==========================================================
   5) PAGE HEADER
   ========================================================== */

.tf-page-header {
    background: var(--tf-card);
    border-radius: var(--tf-radius-lg);
    padding: 20px 20px 16px;
    box-shadow: var(--tf-shadow-soft);
    border: 1px solid var(--tf-border-subtle);
}

.tf-page-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

.tf-page-subtitle {
    font-size: 14px;
    color: var(--tf-text-soft);
    line-height: 1.5;
    margin-bottom: 16px;
}

.tf-header-divider {
    height: 1px;
    background: var(--tf-border-subtle);
    margin-bottom: 16px;
}

/* Mode selector */
.tf-mode-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tf-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tf-text-muted);
}

/* ==========================================================
   6) CUSTOM TF SELECTS
   ========================================================== */

.tf-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 420px;
}

.tf-select {
    width: 100%;
    padding: 10px 40px 10px 12px;
    font-size: 14px;
    border-radius: var(--tf-radius-md);
    border: 1px solid var(--tf-input-border);
    background: var(--tf-input-bg);
    appearance: none;
}

/* ==========================================================
   7) CALCULATOR BOX + COLUMNS
   ========================================================== */

.calculator-box {
    background: var(--tf-card);
    border-radius: var(--tf-radius-lg);
    padding: 20px;
    box-shadow: var(--tf-shadow-card);
    border: 1px solid var(--tf-border-subtle);
}

.calc-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 4px;
}

.calc-col h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.calc-col label {
    display: block;
    font-size: 13px;
    margin-top: 6px;
    margin-bottom: 2px;
}

.calc-col input,
.calc-col select {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border-radius: var(--tf-radius-sm);
    border: 1px solid var(--tf-input-border);
    background: var(--tf-input-bg);
}

/* Mode blocks */
.calc-mode-block {
    margin-bottom: 4px;
}

/* Hidden mode utility (used by concrete engine) */
.tf-hidden {
    display: none !important;
}

/* ==========================================================
   8) ACTION BUTTONS + RESULTS
   ========================================================== */

.calc-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
}

.calc-btn {
    background: var(--tf-accent);
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: var(--tf-radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--tf-shadow-soft);
}

.calc-btn:hover {
    background: var(--tf-accent-strong);
}

.results-box {
    margin-top: 16px;
    background: var(--tf-card);
    border-radius: var(--tf-radius-md);
    padding: 16px 18px;
    border: 1px solid var(--tf-border-subtle);
    font-size: 14px;
    line-height: 1.5;
}

/* ==========================================================
   9) AD SLOTS
   ========================================================== */

.ad-top,
.ad-bottom {
    min-height: 90px;
    margin: 8px 0;
    border-radius: var(--tf-radius-md);
    border: 1px dashed var(--tf-border-subtle);
}

/* Inline ad (center column) */
.ad-inline {
    min-height: 140px;
    margin: 16px 0 8px;
    border-radius: var(--tf-radius-lg);
    border: 1px dashed var(--tf-border-subtle);
    background: #eef1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--tf-text-soft);
}

/* Placeholder content style */
.ad-placeholder {
    width: 100%;
    height: 100%;
    padding: 18px;
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--tf-text-soft);
}

/* ==========================================================
   10) RELATED TOOLS + AFFILIATES
   ========================================================== */

.related-tools {
    margin-top: 16px;
    background: var(--tf-card);
    border-radius: var(--tf-radius-md);
    padding: 16px;
    border: 1px solid var(--tf-border-subtle);
}

.affiliate-products {
    margin-top: 16px;
    background: var(--tf-card);
    border-radius: var(--tf-radius-md);
    padding: 16px;
    border: 1px solid var(--tf-border-subtle);
}

.affiliate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.affiliate-card {
    border-radius: var(--tf-radius-md);
    border: 1px solid var(--tf-border-subtle);
    padding: 12px 14px;
    box-shadow: var(--tf-shadow-soft);
    background: #ffffff;
}

.affiliate-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.affiliate-desc {
    font-size: 13px;
    color: var(--tf-text-soft);
    margin-bottom: 8px;
}

.affiliate-link {
    font-size: 13px;
    font-weight: 600;
}

/* ==========================================================
   11) HOT TOOLS — Premium Card Styling
   ========================================================== */

.hot-tools-card {
    margin-top: 16px;
    background: var(--tf-card);
    border-radius: var(--tf-radius-md);
    padding: 16px 18px;
    border: 1px solid var(--tf-border-subtle);
    box-shadow: var(--tf-shadow-soft);
}

.hot-tools-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.hot-tools-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hot-tools-list li {
    margin-bottom: 10px;
}

.hot-tools-link {
    font-size: 14px;
    font-weight: 500;
}

/* ==========================================================
   12) RESPONSIVE
   ========================================================== */

@media (max-width: 900px) {
    .layout {
        flex-direction: column;
        padding: 16px;
    }

    .left-nav {
        width: 100%;
        order: -1;
    }

    .calc-columns {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   RIGHT SIDEBAR AD LANE (TOOLFLUENCY v3)
   ========================================================== */

.right-ad {
    width: 160px;
    flex-shrink: 0;
    margin-left: 24px;
    position: sticky;
    top: 20px;
    min-height: 600px;
    display: flex;
    align-items: flex-start;
}

.ad-placeholder.ad-right {
    width: 160px;
    height: 600px;
    background: #eef1f4;
    border: 1px dashed var(--tf-border-subtle);
    border-radius: var(--tf-radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #768192;
    font-size: 14px;
}

/* ==========================================================
   MAIN LAYOUT WITH LEFT NAV + CONTENT + RIGHT AD
   ========================================================== */

.layout {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 24px;
    padding: 24px;
    box-sizing: border-box;
}

.left-nav {
    width: 240px;
    flex-shrink: 0;
}

.page-content {
    flex: 1;
    max-width: 850px;
    min-width: 0;
}

.left-nav .nav-section {
    margin-top: 16px;
}

/* ==========================================================
   CONCRETE INFO CARD + BAG TABLE
   ========================================================== */

.info-card {
    background: var(--tf-card);
    border-radius: var(--tf-radius-lg);
    padding: 20px 22px;
    border: 1px solid var(--tf-border-subtle);
    box-shadow: var(--tf-shadow-soft);
    margin-top: 24px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.info-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 18px;
    margin-bottom: 8px;
}

.info-card p {
    margin-bottom: 8px;
    color: var(--tf-text-soft);
}

.info-card ul {
    padding-left: 18px;
    margin: 6px 0 10px;
}

.info-card li {
    margin-bottom: 4px;
}

/* Bag yield table */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 4px;
    font-size: 0.9rem;
}

.info-table th,
.info-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--tf-border-subtle);
    text-align: left;
}

.info-table th {
    font-weight: 700;
    color: var(--tf-text-muted);
}

.info-table tr:last-child td {
    border-bottom: none;
}

.info-note {
    font-size: 0.85rem;
    color: var(--tf-text-soft);
    margin-top: 6px;
}
