* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f8fafc;
    color: #0f172a;
}

a {
    color: inherit;
}

.container {
    width: min(1180px, calc(100% - 48px));
    margin: auto;
}


/* HEADER */

.site-header {
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    color: #2563eb;
    text-decoration: none;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -.04em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-nav a {
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    font-size: 14px;
}

.main-nav a:hover,
.main-nav a.active {
    color: #2563eb;
}

.menu-button {
    display: none;
    border: 0;
    background: transparent;
    font-size: 25px;
    cursor: pointer;
}


/* HERO */

.template-hero {
    padding: 85px 0 75px;
    background:
        radial-gradient(circle at 85% 15%, rgba(37,99,235,.12), transparent 28%),
        linear-gradient(180deg, #fff, #f8fafc);
    border-bottom: 1px solid #e2e8f0;
}

.hero-badge,
.section-label {
    color: #2563eb;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .08em;
}

.template-hero h1 {
    max-width: 820px;
    margin: 18px 0;
    font-size: clamp(42px, 7vw, 68px);
    line-height: 1.02;
    letter-spacing: -.05em;
}

.template-hero h1 span {
    color: #2563eb;
}

.template-hero > .container > p {
    max-width: 760px;
    color: #64748b;
    font-size: 19px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.primary-button,
.secondary-button {
    padding: 13px 19px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 750;
}

.primary-button {
    background: #2563eb;
    color: #fff;
}

.secondary-button {
    background: #fff;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.hero-note {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
}

.hero-note strong {
    color: #334155;
}


/* GENERAL SECTIONS */

.section {
    padding: 70px 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-heading h2 {
    margin: 8px 0;
    font-size: 34px;
    letter-spacing: -.03em;
}

.section-heading p {
    max-width: 680px;
    margin: 0;
    color: #64748b;
    line-height: 1.65;
}


/* CATEGORIES */

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.category-card {
    display: flex;
    gap: 20px;
    padding: 27px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 17px;
    text-decoration: none;
    box-shadow: 0 7px 24px rgba(15,23,42,.035);
    transition: .2s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: #93c5fd;
    box-shadow: 0 12px 30px rgba(15,23,42,.07);
}

.category-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #eff6ff;
    font-size: 27px;
}

.category-card h3 {
    margin: 2px 0 8px;
    font-size: 21px;
}

.category-card p {
    margin: 0 0 14px;
    color: #64748b;
    line-height: 1.6;
}

.category-card span {
    color: #2563eb;
    font-size: 14px;
    font-weight: 750;
}


/* TEMPLATE CARDS */

.featured-section {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.template-card {
    padding: 23px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 330px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 5px 18px rgba(15,23,42,.03);
    transition: transform .2s ease,
                border-color .2s ease,
                box-shadow .2s ease;
}

.template-card:hover {
    transform: translateY(-3px);
    border-color: #93c5fd;
    box-shadow: 0 10px 26px rgba(15,23,42,.07);
}

.template-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.template-type,
.status {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
}

.template-type {
    color: #2563eb;
}

.status {
    padding: 5px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
}

.template-icon {
    margin-top: 24px;
    font-size: 31px;
}

.template-card h3 {
    margin: 12px 0 8px;
    font-size: 20px;
    color: #0f172a;
}

.template-card > p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.template-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 17px;
}

.template-tags span {
    padding: 5px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
}

.coming-link {
    margin-top: auto;
    padding-top: 22px;
    color: #94a3b8;
    font-weight: 700;
}


/* WORKFLOW */

.workflow-box {
    padding: 38px;
    border-radius: 20px;
    background: #0f172a;
    color: #fff;
}

.workflow-heading h2 {
    margin: 8px 0;
    font-size: 32px;
}

.workflow-heading > p {
    margin: 0;
    color: #94a3b8;
    line-height: 1.6;
}

.workflow {
    margin-top: 32px;
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    gap: 15px;
    align-items: center;
}

.workflow > div:not(.workflow-arrow) {
    padding: 19px;
    border: 1px solid #334155;
    border-radius: 13px;
    background: #1e293b;
}

.workflow > div > span {
    color: #60a5fa;
    font-size: 12px;
    font-weight: 800;
}

.workflow strong {
    display: block;
    margin: 8px 0;
}

.workflow p {
    margin: 0;
    color: #94a3b8;
    line-height: 1.5;
    font-size: 13px;
}

.workflow-arrow {
    color: #64748b;
    font-size: 20px;
}

.workflow-example {
    margin-top: 25px;
    padding-top: 23px;
    border-top: 1px solid #334155;
}

.workflow-example p {
    color: #cbd5e1;
}

.workflow-example p span {
    margin: 0 8px;
    color: #60a5fa;
}

.workflow-box > a {
    display: inline-block;
    margin-top: 8px;
    color: #60a5fa;
    font-weight: 700;
    text-decoration: none;
}


/* BENEFITS */

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
}

.benefit {
    padding: 22px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
}

.benefit > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    font-weight: 900;
}

.benefit h3 {
    margin: 14px 0 7px;
}

.benefit p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
    font-size: 14px;
}


/* FOOTER */

.footer {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 45px 0 25px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 35px;
}

.footer-brand {
    color: #2563eb;
    font-size: 23px;
    font-weight: 900;
}

.footer p {
    color: #64748b;
}

.footer h4 {
    margin-top: 0;
}

.footer a {
    display: block;
    margin: 10px 0;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
}

.footer a:hover {
    color: #2563eb;
}

.copyright {
    border-top: 1px solid #e2e8f0;
    margin-top: 35px;
    padding-top: 20px;
    color: #94a3b8;
    font-size: 13px;
}


/* RESPONSIVE */

@media (max-width: 900px) {

    .template-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .benefit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow {
        grid-template-columns: 1fr;
    }

    .workflow-arrow {
        transform: rotate(90deg);
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 720px) {

    .container {
        width: min(100% - 32px, 1180px);
    }

    .menu-button {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        padding: 16px;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        flex-direction: column;
        align-items: flex-start;
        box-shadow: 0 15px 35px rgba(15,23,42,.12);
    }

    .main-nav.open {
        display: flex;
    }

    .template-hero {
        padding: 60px 0;
    }

    .template-hero h1 {
        font-size: 43px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-button,
    .secondary-button {
        text-align: center;
    }

    .category-grid,
    .template-grid,
    .benefit-grid {
        grid-template-columns: 1fr;
    }

    .category-card:last-child {
        grid-column: auto;
    }

    .workflow-box {
        padding: 25px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}
/* ===== FIVE STEP WORKFLOW ===== */

.workflow-five {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) auto
        minmax(0, 1fr) auto
        minmax(0, 1fr) auto
        minmax(0, 1fr) auto
        minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.workflow-five > div:not(.workflow-arrow) {
    min-width: 0;
    width: auto;
}

.workflow-five .workflow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 0;
}

/* Tablet */

@media (max-width: 1100px) {

    .workflow-five {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .workflow-five .workflow-arrow {
        transform: rotate(90deg);
        min-height: 24px;
    }
}

/* Mobile */

@media (max-width: 640px) {

    .workflow-five {
        grid-template-columns: 1fr;
    }

    .workflow-five > div:not(.workflow-arrow) {
        width: 100%;
    }
}
/* ===== HOMEPAGE SEARCH ===== */

.home-search {
    width: 100%;
    max-width: 880px;
    margin: 28px 0 0;
    display: flex;
    gap: 12px;
}

.home-search input {
    flex: 1;
    min-width: 0;
    padding: 15px 18px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    outline: none;
}

.home-search input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.home-search button {
    padding: 15px 24px;
    border: 0;
    border-radius: 12px;
    background: #2563eb;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.home-search button:hover {
    background: #1d4ed8;
}

@media (max-width: 640px) {

    .home-search {
        flex-direction: column;
    }

    .home-search button {
        width: 100%;
    }
}
.template-link.live-link {
    margin-top: 28px;
    color: #2563eb;
    font-weight: 700;
    font-size: 16px;
}

.template-card:hover .template-link.live-link {
    color: #1d4ed8;
}
/* =========================================================
   TOOL CARD ALIGNMENT FIX
   ========================================================= */

.template-card {
    display: flex;
    flex-direction: column;
}

/* Push tags toward the bottom of every card */
.template-card .template-tags {
    margin-top: auto;
}

/* Keep live and coming-soon actions on the same baseline */
.template-card .template-link,
.template-card .coming-link {
    margin-top: 24px;
    min-height: 24px;
}

/* Live tool action */
.template-card .template-link.live-link {
    color: #2563eb;
    font-weight: 700;
    font-size: 16px;
}

.template-card:hover .template-link.live-link {
    color: #1d4ed8;
}


/* =========================================================
   LIVE STATUS BADGE
   ========================================================= */

.template-card .status.live {
    background: #dcfce7 !important;
    color: #15803d !important;
}
/* =========================================================
   FINANCE 3-CARD ROW
   ========================================================= */

.finance-three-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
}

@media(max-width:950px){
    .finance-three-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:650px){
    .finance-three-grid{
        grid-template-columns:1fr;
    }
}
/* ===== RELATED TEMPLATE CARDS ===== */

.related-template-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.related-template-grid .template-card {
    display: block;
    height: auto;
    min-height: 0;
    padding: 20px 22px;
    text-decoration: none;
}

.related-template-grid .template-card-top {
    margin-bottom: 16px;
}

.related-template-grid .template-icon {
    margin-bottom: 12px;
}

.related-template-grid .template-card h3 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.3;
}

.related-template-grid .template-card p {
    margin: 0 0 14px;
    line-height: 1.55;
}

.related-template-grid .coming-link {
    margin-top: 0;
    padding-top: 0;
    color: #2563eb;
    font-weight: 600;
}

.related-template-grid .status.live {
    background: #dcfce7;
    color: #166534;
}

@media (max-width: 900px) {
    .related-template-grid {
        grid-template-columns: 1fr;
    }
}
/* ===== COMPACT RELATED TEMPLATE CARDS ===== */

.related-template-section .related-template-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.related-template-section .related-template-grid .template-card {
    min-height: 0 !important;
    height: auto !important;

    display: block !important;

    padding: 20px 22px !important;
}

.related-template-section .related-template-grid .template-card-top {
    margin-bottom: 14px;
}

.related-template-section .related-template-grid .template-icon {
    margin-top: 0 !important;
    margin-bottom: 10px;
    font-size: 28px;
}

.related-template-section .related-template-grid .template-card h3 {
    margin: 0 0 8px !important;
    font-size: 19px;
    line-height: 1.3;
}

.related-template-section .related-template-grid .template-card > p {
    margin: 0 0 14px !important;
    line-height: 1.55;
}

.related-template-section .related-template-grid .coming-link {
    margin-top: 0 !important;
    padding-top: 0 !important;

    color: #2563eb;
    font-weight: 700;
}

@media (max-width: 900px) {

    .related-template-section .related-template-grid {
        grid-template-columns: 1fr;
    }
}
/* ===== STOCK COUNT BEST PRACTICES ===== */

.stock-count-practice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.stock-count-practice-grid .benefit {
    height: 100%;
}

.stock-count-practice-note {
    margin-top: 22px;
    padding: 20px 24px;

    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-left: 4px solid #2563eb;
    border-radius: 14px;
}

.stock-count-practice-note p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.stock-count-practice-note strong {
    color: #0f172a;
}

@media (max-width: 640px) {

    .stock-count-practice-grid {
        grid-template-columns: 1fr;
    }

    .stock-count-practice-note {
        padding: 18px 20px;
    }
}