/* ============================================================
   ChemSmog Footer — Figma component 59:291
   ============================================================ */

body .cs-footer,
body .cs-footer * { box-sizing: border-box; }

body .cs-footer {
    margin-top: auto;
    width: 100%;
    font-family: var(--cs-font-primary);
    color: var(--cs-white);
}

/* ---------- Main: gradient with 3 nav cols + newsletter card ---------- */
.cs-footer__main {
    background: linear-gradient(90deg, var(--cs-footer-g1) 0%, var(--cs-footer-g2) 50%, var(--cs-footer-g3) 100%);
    padding: 56px 0 64px;
    width: 100%;
}

.cs-footer__container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1.1fr 1.1fr 1.1fr 1.7fr;
    gap: 32px;
}

.cs-footer__col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cs-footer__col h3 {
    color: var(--cs-white);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0 0 8px 0;
}
.cs-footer__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cs-footer__col li a,
.cs-footer__col li span {
    color: var(--cs-white);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity .15s ease;
}
.cs-footer__col li a:hover { opacity: 0.85; color: var(--cs-white); }
.cs-footer__col .cs-footer__icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

/* ---------- Newsletter card ---------- */
.cs-footer__newsletter {
    background-image: linear-gradient(135deg, rgba(89,205,194,0.65) 0%, rgba(0,123,169,0.45) 100%),
                      url('/storage/chemsmog/newsletter/newsletter.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 220px;
}
.cs-footer__newsletter-text {
    color: var(--cs-white);
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
    margin: 0 0 18px 0;
    font-weight: 400;
}
.cs-footer__newsletter-form {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: wrap;
}
.cs-footer__newsletter-form .cs-btn-pill {
    flex: 0 0 auto;
    padding: 0 22px;
    background: linear-gradient(90deg, var(--cs-btn-g1) 0%, var(--cs-btn-g2) 100%);
    color: var(--cs-white);
    border: none;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform .15s ease;
    height: 44px;
    white-space: nowrap;
}
.cs-footer__newsletter-form .cs-btn-pill:hover { transform: translateY(-1px); }
.cs-footer__newsletter-form .cs-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    padding: 0 16px;
    background: var(--cs-white);
    color: var(--cs-text);
    border: none;
    border-radius: 9999px;
    font-size: 14px;
    font-family: var(--cs-font-primary);
    outline: none;
}
.cs-footer__newsletter-form .cs-input::placeholder { color: var(--cs-text-light); }
.cs-footer__newsletter-form .cs-icon-arrow {
    width: 44px;
    height: 44px;
    background: var(--cs-teal);
    border-radius: 9999px;
    color: var(--cs-white);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Bottom bar ---------- */
.cs-footer__bottom {
    background: var(--cs-blue);
    color: var(--cs-white);
    padding: 16px 0;
    font-size: 12px;
}
.cs-footer__bottom-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.cs-footer__bottom-left,
.cs-footer__bottom-right {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--cs-white);
}
.cs-footer__bottom-left .cs-footer__logo-icon {
    width: 22px;
    height: 22px;
    opacity: 0.9;
}
.cs-footer__bottom .cs-footer__sep {
    opacity: 0.5;
    margin: 0 4px;
}
.cs-footer__bottom a {
    color: var(--cs-white);
    text-decoration: none;
    border-bottom: 1px dotted rgba(255,255,255,0.4);
}
.cs-footer__bottom a:hover { color: var(--cs-white); opacity: 0.85; }

/* ---------- Hide Farmart default footer when ours is present ---------- */
body > footer.footer:not(.cs-footer),
body footer.footer.footer-js-handler:not(.cs-footer) {
    display: none !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .cs-footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
    .cs-footer__newsletter {
        grid-column: 1 / -1;
    }
}
@media (max-width: 575px) {
    .cs-footer__container {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .cs-footer__bottom-container { flex-direction: column; align-items: flex-start; text-align: left; }
    .cs-footer__newsletter-form { flex-direction: column; }
    .cs-footer__newsletter-form .cs-icon-arrow { display: none; }
}

/* Footer bottom-bar brand mark (white PNG) */
img.cs-footer__logo-icon {
    width: 26px !important;
    height: auto !important;
    max-width: none !important;
    opacity: 0.95;
    display: inline-block;
    vertical-align: middle;
}
