/* =========================================================
   THE KINGS MART — Homepage Final Polish
   ========================================================= */

:root {
    --tkm-blue: #0874f9;
    --tkm-blue-dark: #0558bd;
    --tkm-navy: #06162a;
    --tkm-text: #17263a;
    --tkm-muted: #64748b;
    --tkm-border: #e1e9f2;
    --tkm-section-space: 88px;
}

/* Prevent accidental horizontal scrolling */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Consistent heading appearance */

.tkm-product-section-title,
.tkm-discovery-heading h2,
.tkm-why-heading h2,
.tkm-home-cta h2,
.tkm-footer-hero h2 {
    text-wrap: balance;
}

/* Consistent section spacing */

.tkm-product-showcase {
    padding-top: 70px;
    padding-bottom: 70px;
}

.tkm-discovery,
.tkm-why {
    padding-top: var(--tkm-section-space);
    padding-bottom: var(--tkm-section-space);
}

/* Better transition between Why Choose Us and CTA */

.tkm-why {
    padding-bottom: 55px;
}

.tkm-home-cta {
    margin-top: 30px;
    margin-bottom: 30px;
}

/* Product card refinements */

.tkm-product-card {
    min-width: 0;
}

.tkm-product-name {
    min-height: 44px;
}

.tkm-product-description {
    min-height: 43px;
}

.tkm-product-actions .btn-primary {
    letter-spacing: 0.1px;
}

/* Product carousel spacing */

.tkm-product-showcase .splide__track {
    margin-top: 16px;
}

.tkm-product-showcase .splide__slide {
    padding-top: 10px !important;
    padding-bottom: 18px !important;
}

/* Discovery cards */

.tkm-brand-card,
.tkm-category-card,
.tkm-why-card {
    will-change: transform;
}

.tkm-brand-card:focus-visible,
.tkm-category-card:focus-visible,
.tkm-discovery-view-all:focus-visible,
.tkm-why-button:focus-visible,
.tkm-home-cta-primary:focus-visible,
.tkm-home-cta-secondary:focus-visible {
    outline: 3px solid rgba(8, 116, 249, 0.35);
    outline-offset: 3px;
}

/* Footer brand section */

.tkm-footer-brand-wrap {
    width: 100%;
}

.tkm-footer-brand-wrap .tkm-footer-hero {
    width: min(1280px, calc(100% - 48px));
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 24px 48px;
}

.tkm-footer-hero-left {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.tkm-footer-logo {
    display: block;
    margin-right: auto;
    margin-left: auto;
}

.tkm-footer-hero::after {
    content: "";
    display: block;
    width: 180px;
    height: 2px;
    margin: 34px auto 0;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--tkm-blue),
        transparent
    );
}

.tkm-footer-contact {
    width: 100%;
    justify-content: center;
}

/* Lower footer alignment */

footer[aria-labelledby="footer-heading"] > div {
    margin-right: auto;
    margin-left: auto;
}

/* Improve footer menu columns */

footer[aria-labelledby="footer-heading"] ul {
    padding: 0;
}

footer[aria-labelledby="footer-heading"] li a {
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

footer[aria-labelledby="footer-heading"] li a:hover {
    transform: translateX(3px);
}

/* Mobile polish */

@media (max-width: 767px) {
    :root {
        --tkm-section-space: 62px;
    }

    .tkm-product-showcase {
        padding-top: 52px;
        padding-bottom: 52px;
    }

    .tkm-product-section-title,
    .tkm-discovery-heading h2,
    .tkm-why-heading h2 {
        font-size: 31px;
    }

    .tkm-home-cta {
        margin-top: 22px;
        margin-bottom: 20px;
    }

    .tkm-footer-brand-wrap .tkm-footer-hero {
        width: min(100% - 28px, 680px);
        padding: 45px 10px 38px;
    }

    .tkm-footer-hero h2 {
        font-size: 32px;
    }

    .tkm-footer-hero p {
        font-size: 15px;
    }
}

/* Disable movement for users who prefer reduced motion */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
