/* ============================================================
   TIMIZA AGRO MACHINERY - MARKETPLACE UI (v4)
   ------------------------------------------------------------
   Loaded AFTER style.css, so every rule here is an override of
   the v3 look. Nothing is removed from style.css - if this file
   is dequeued the site falls back to the old design intact.

   Direction: the conventions shoppers already know from large
   marketplaces - search-led header, category rail, dense white
   product grid on a cool neutral page, price and financing as
   the loudest thing on a card, borders (not shadows) doing the
   separating, and one CTA per card that says what happens.
   ============================================================ */

:root {
    /* Brand */
    --tfm-green: #0B6B79;          /* primary teal */
    --tfm-green-dark: #05505C;
    --tfm-green-light: #E6F2F4;
    --tfm-orange: #E2680F;         /* commerce accent / financing */
    --tfm-orange-dark: #B85210;
    --tfm-orange-light: #FFF3E8;

    /* Neutrals */
    --tfm-navy: #13202C;           /* ink */
    --tfm-white: #FFFFFF;
    --tfm-gray-light: #F4F6F7;     /* page tint */
    --tfm-gray: #E3E8EA;           /* borders */
    --tfm-gray-medium: #C9D1D4;
    --tfm-gray-dark: #5C6B73;
    --tfm-text: #13202C;
    --tfm-text-light: #44545E;
    --tfm-text-muted: #7A8891;

    /* Supporting */
    --tfm-stock: #147C4A;
    --tfm-stock-light: #E8F5EE;

    /* Type */
    --tfm-font-heading: 'Gabarito', 'Segoe UI', sans-serif;
    --tfm-font-body: 'Inter', 'Segoe UI', sans-serif;

    /* Layout */
    --tfm-container-max: 1320px;
    --tfm-container-padding: 0 20px;
    --tfm-radius-sm: 8px;
    --tfm-radius-md: 10px;
    --tfm-radius-lg: 14px;
    --tfm-radius-full: 999px;

    /* Elevation - deliberately shallow; borders carry structure */
    --tfm-shadow-sm: 0 1px 2px rgba(19, 32, 44, 0.06);
    --tfm-shadow-md: 0 4px 14px rgba(19, 32, 44, 0.08);
    --tfm-shadow-lg: 0 12px 32px rgba(19, 32, 44, 0.12);
    --tfm-shadow-xl: 0 20px 48px rgba(19, 32, 44, 0.16);

    --tfm-transition: all 0.2s ease;
    --tfm-transition-fast: all 0.12s ease;

    --tfm-header-h: 132px;
}

/* ---------- Base ---------- */
.tfm-body {
    background: var(--tfm-gray-light);
    font-size: 15.5px;
    line-height: 1.6;
    letter-spacing: 0;
}
.tfm-body h1, .tfm-body h2, .tfm-body h3, .tfm-body h4 { letter-spacing: -0.015em; }
.tfm-body strong { font-weight: 700; }
.tfm-section { background: var(--tfm-white); padding: 56px 0; }
.tfm-section:nth-child(even) { background: var(--tfm-white); }
.tfm-bg-light, .tfm-section.tfm-bg-light { background: var(--tfm-gray-light); }

/* Prices and counts line up column-to-column */
.tfm-product-price, .tfm-product-finance, .tfm-stat strong,
.tfm-lipa-plan-item strong, .tfm-qv-price-main {
    font-variant-numeric: tabular-nums;
}

/* Keyboard focus is visible everywhere, on every control */
.tfm-body a:focus-visible,
.tfm-body button:focus-visible,
.tfm-body input:focus-visible,
.tfm-body select:focus-visible,
.tfm-body textarea:focus-visible {
    outline: 2px solid var(--tfm-green);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Buttons ---------- */
.tfm-btn {
    padding: 12px 22px;
    border-radius: var(--tfm-radius-md);
    font-weight: 650;
    font-size: 0.92rem;
    letter-spacing: 0;
    border-width: 1px;
    box-shadow: none;
}
.tfm-btn-primary { background: var(--tfm-green); box-shadow: none; }
.tfm-btn-primary:hover { background: var(--tfm-green-dark); box-shadow: none; transform: none; }
.tfm-btn-primary:active { transform: none; }
.tfm-btn-accent { background: var(--tfm-orange); box-shadow: none; }
.tfm-btn-accent:hover { background: var(--tfm-orange-dark); box-shadow: none; transform: none; }
.tfm-btn-accent:active { transform: none; }
.tfm-btn-outline { border-color: var(--tfm-gray-medium); color: var(--tfm-green-dark); background: var(--tfm-white); }
.tfm-btn-outline:hover { background: var(--tfm-green-light); border-color: var(--tfm-green); color: var(--tfm-green-dark); }
.tfm-btn-lg { padding: 15px 30px; font-size: 1rem; }
.tfm-btn-block { width: 100%; }

/* ---------- Header ---------- */
.tfm-header { box-shadow: none; border-bottom: 1px solid var(--tfm-gray); }

.tfm-topbar { background: var(--tfm-navy); color: #C3CED4; font-size: 0.78rem; }
.tfm-topbar-inner { padding: 7px 20px; }
.tfm-topbar-right { gap: 18px; }
.tfm-topbar-right a { color: #C3CED4; font-weight: 550; }
.tfm-topbar-right a:hover { color: #fff; }

.tfm-navbar { border-bottom: 1px solid var(--tfm-gray); }
.tfm-header.tfm-scrolled .tfm-navbar { box-shadow: none; }
.tfm-nav-wrapper { padding: 10px 20px; gap: 18px; }
img.tfm-logo-img { height: 46px; }

/* Search is the centrepiece of the header, the way shoppers expect */
.tfm-header-search {
    flex: 1;
    display: flex;
    align-items: stretch;
    max-width: 560px;
    margin: 0 auto;
    border: 1.5px solid var(--tfm-gray-medium);
    border-radius: var(--tfm-radius-md);
    background: var(--tfm-white);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tfm-header-search:focus-within {
    border-color: var(--tfm-green);
    box-shadow: 0 0 0 3px rgba(11, 107, 121, 0.12);
}
.tfm-header-search input {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--tfm-text);
    background: transparent;
}
.tfm-header-search input::placeholder { color: var(--tfm-text-muted); }
.tfm-header-search input:focus { outline: none; }
.tfm-header-search button {
    border: none;
    background: var(--tfm-green);
    color: #fff;
    padding: 0 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 650;
}
.tfm-header-search button:hover { background: var(--tfm-green-dark); }
.tfm-header-search-label { display: inline; }

.tfm-nav-menu { flex: 0 0 auto; gap: 2px; }
.tfm-nav-link { padding: 9px 14px; font-size: 0.92rem; border-radius: var(--tfm-radius-sm); font-weight: 600; }
.tfm-nav-link:hover { background: var(--tfm-gray-light); color: var(--tfm-green-dark); }
.tfm-nav-link.active { background: transparent; color: var(--tfm-green-dark); box-shadow: inset 0 -2px 0 var(--tfm-orange); border-radius: 0; }
.tfm-nav-cta { padding: 10px 18px; }

/* Category rail - one tap from any page to any part of the catalog */
.tfm-catrail {
    background: var(--tfm-white);
    border-bottom: 1px solid var(--tfm-gray);
    overflow: hidden;
    max-height: 54px;
    transition: max-height 0.25s ease, opacity 0.2s ease;
}
.tfm-header.tfm-scrolled .tfm-catrail { max-height: 0; opacity: 0; border-bottom-color: transparent; }
.tfm-catrail-inner {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tfm-catrail-inner::-webkit-scrollbar { display: none; }
.tfm-catrail-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: var(--tfm-radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tfm-text-light);
    white-space: nowrap;
}
.tfm-catrail-link i { color: var(--tfm-green); font-size: 0.82rem; }
.tfm-catrail-link:hover { background: var(--tfm-green-light); color: var(--tfm-green-dark); }
.tfm-catrail-link.tfm-catrail-all { color: var(--tfm-green-dark); background: var(--tfm-green-light); }
.tfm-catrail-link.tfm-catrail-lipa { color: var(--tfm-orange-dark); background: var(--tfm-orange-light); margin-left: auto; }
.tfm-catrail-link.tfm-catrail-lipa i { color: var(--tfm-orange); }

/* ---------- Hero: split layout ----------
   Timiza's banner images are finished artwork - one carries its own headline
   and button, the other is a photo of the signed shopfront. Overlaying the
   site's headline on them put two sets of words on top of each other, and
   cover-cropping them into a wide band cut the artwork's own edges off. So:
   the words get a solid panel, the banner gets a frame and is shown whole.
   (This is also deliberately not the full-bleed photo-with-overlay hero used
   on timizafarmmachinery.co.ke - the two sites should not read as one.) */
.tfm-hero--split {
    display: block;
    min-height: 0;
    overflow: visible;
    background:
        radial-gradient(110% 80% at 10% 0%, rgba(11, 107, 121, 0.55) 0%, transparent 62%),
        linear-gradient(158deg, #0C2733 0%, #0A1C26 58%, #07141B 100%);
}

.tfm-hero--split .tfm-hero-container {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
    padding: 52px 20px 76px;
}

/* On a solid band the translucent card is redundant - drop it and let an
   orange rule carry the brand instead. */
.tfm-hero--split .tfm-hero-panel {
    max-width: 560px;
    padding: 0 0 0 20px;
    background: none;
    border: none;
    border-left: 3px solid var(--tfm-orange);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.tfm-hero--split .tfm-hero-eyebrow { color: #E9C79A; margin-bottom: 14px; }
.tfm-hero--split .tfm-hero-tagline { color: #C7D7DC; text-shadow: none; }
.tfm-hero--split .tfm-hero-title { text-shadow: none; }
.tfm-hero--split .tfm-hero-actions .tfm-btn { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28); }

/* The frame: a white mat around the banner, so a 4:3 photo fills it and a
   3:2 graphic sits inside it complete rather than being cropped. */
.tfm-hero-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--tfm-white);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 26px 64px rgba(0, 0, 0, 0.38);
    overflow: hidden;
}
.tfm-hero--split .tfm-hero-slides {
    position: absolute;
    inset: 10px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--tfm-gray-light);
}
.tfm-hero--split .tfm-hero-slide img {
    object-fit: contain;
    object-position: center;
    background: var(--tfm-gray-light);
}
.tfm-hero--split .tfm-hero-slide-overlay { display: none; }

/* Carousel controls live inside the frame, dark-on-white */
.tfm-hero--split .tfm-hero-carousel-arrow {
    width: 36px;
    height: 36px;
    background: rgba(19, 32, 44, 0.55);
    backdrop-filter: none;
    color: #fff;
}
.tfm-hero--split .tfm-hero-carousel-arrow:hover { background: rgba(19, 32, 44, 0.8); }
.tfm-hero--split .tfm-hero-carousel-prev { left: 18px; }
.tfm-hero--split .tfm-hero-carousel-next { right: 18px; }
.tfm-hero--split .tfm-hero-carousel-dots { bottom: 20px; }
.tfm-hero--split .tfm-hero-carousel-dot { background: rgba(19, 32, 44, 0.28); }
.tfm-hero--split .tfm-hero-carousel-dot.active { background: var(--tfm-orange); }

/* The scroll cue is gone from this hero - the search card that overlaps the
   band's bottom edge now does that job, and the two collided. */
.tfm-hero--split .tfm-hero-scroll { display: none; }

/* Element+class, so this beats the global ".tfm-body h1" navy heading rule.
   Without it the homepage headline renders dark ink instead of white - the
   same specificity trap already documented on h1.tfm-page-hero-title. */
h1.tfm-hero-title,
.tfm-hero-title {
    color: #fff;
    font-weight: 700;
    line-height: 1.12;
}

/* Homepage search card sits on the hero edge */
.tfm-home-search-card {
    border-radius: var(--tfm-radius-lg);
    box-shadow: var(--tfm-shadow-lg);
    border: 1px solid var(--tfm-gray);
    max-width: 780px;
    padding: 8px 8px 8px 4px;
}
.tfm-home-search-card .tfm-shop-search input { min-height: 46px; }

/* ---------- Section headers ---------- */
.tfm-section-header {
    text-align: left;
    max-width: none;
    margin: 0 0 28px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--tfm-gray);
}
.tfm-section-header h2 {
    font-size: clamp(1.4rem, 2.6vw, 1.85rem);
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--tfm-navy);
}
.tfm-section-header p { font-size: 0.95rem; color: var(--tfm-text-light); max-width: 70ch; }
.tfm-section-cta { text-align: left; margin-top: 28px; }

/* ---------- Trust strip ---------- */
.tfm-stats-strip { background: var(--tfm-white); border-top: 1px solid var(--tfm-gray); border-bottom: 1px solid var(--tfm-gray); padding: 0; }
.tfm-stats-grid { gap: 0; text-align: left; }
.tfm-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 16px 18px;
    border-right: 1px solid var(--tfm-gray);
}
.tfm-stat:last-child { border-right: none; }
.tfm-stat strong { color: var(--tfm-navy); font-size: 1.15rem; font-weight: 700; margin-bottom: 0; }
.tfm-stat strong i { color: var(--tfm-green); font-size: 1.05rem; }
.tfm-stat span { color: var(--tfm-text-muted); font-size: 0.8rem; font-weight: 550; }

/* ---------- Category cards ---------- */
.tfm-category-grid { gap: 12px; }
.tfm-category-card {
    border-radius: var(--tfm-radius-md);
    padding: 20px 14px;
    box-shadow: none;
    opacity: 1;
    transform: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tfm-category-card::before { display: none; }
.tfm-category-card.tfm-in-view { opacity: 1; transform: none; }
.tfm-category-card:hover { transform: none; border-color: var(--tfm-green); box-shadow: var(--tfm-shadow-md); }
.tfm-category-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--tfm-radius-md);
    background: var(--tfm-green-light);
    font-size: 1.3rem;
    margin-bottom: 12px;
    box-shadow: none;
}
.tfm-category-card:hover .tfm-category-icon { transform: none; background: var(--tfm-green); color: #fff; }
.tfm-category-card h3 { font-size: 0.95rem; font-weight: 650; }
.tfm-category-stock { background: var(--tfm-stock-light); color: var(--tfm-stock); font-weight: 650; font-size: 0.73rem; }

/* ---------- Product grid ---------- */
.tfm-product-grid { gap: 14px; }

.tfm-product-card {
    border-radius: var(--tfm-radius-md);
    box-shadow: none;
    opacity: 1;
    transform: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tfm-product-card.tfm-in-view { opacity: 1; transform: none; }
.tfm-product-card:hover {
    transform: none;
    border-color: var(--tfm-gray-medium);
    box-shadow: var(--tfm-shadow-md);
}

/* White plate, whole machine visible - nothing cropped out of frame */
.tfm-product-image {
    aspect-ratio: 4 / 3;
    background: var(--tfm-white);
    border-bottom: 1px solid var(--tfm-gray);
    cursor: pointer;
}
.tfm-product-image::after { display: none; }
.tfm-product-card:hover .tfm-product-image { transform: none; }
.tfm-img-wrap { background: #fff; }
.tfm-img-wrap.tfm-img-loaded { background: #fff; }
.tfm-img-wrap img { object-fit: contain; padding: 12px; transition: transform 0.25s ease, opacity 0.35s ease; }
.tfm-product-card:hover .tfm-img-wrap img { transform: scale(1.04); }

.tfm-badge-lipa {
    top: 10px;
    left: 10px;
    background: var(--tfm-orange-light);
    color: var(--tfm-orange-dark);
    border: 1px solid rgba(226, 104, 15, 0.3);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 4px 10px;
    box-shadow: none;
    letter-spacing: 0;
}
.tfm-badge-branch {
    background: var(--tfm-green-light);
    color: var(--tfm-green-dark);
    border: 1px solid rgba(11, 107, 121, 0.25);
    box-shadow: none;
}
.tfm-badge-gallery { background: rgba(19, 32, 44, 0.62); font-weight: 650; font-size: 0.66rem; }
.tfm-quick-view-hint { background: linear-gradient(0deg, rgba(19, 32, 44, 0.72), transparent); font-weight: 650; }

.tfm-product-body { padding: 14px; gap: 6px; }
.tfm-product-category {
    font-size: 0.73rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--tfm-text-muted);
    font-weight: 550;
}
.tfm-product-name {
    font-family: var(--tfm-font-body);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tfm-product-price {
    font-family: var(--tfm-font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--tfm-navy);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.tfm-product-price-poa { font-size: 1rem; color: var(--tfm-green-dark); font-style: normal; }

/* The financing line is the thing this business wins on - give it weight */
.tfm-product-finance {
    font-size: 0.8rem;
    font-weight: 650;
    color: var(--tfm-orange-dark);
    line-height: 1.35;
}
.tfm-product-finance span { font-weight: 550; color: var(--tfm-text-muted); }
.tfm-product-ship {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    color: var(--tfm-stock);
    font-weight: 550;
}
.tfm-product-ship i { font-size: 0.72rem; }

.tfm-product-actions { gap: 8px; padding-top: 10px; }
.tfm-product-actions .tfm-btn { padding: 10px 14px; font-size: 0.83rem; }
.tfm-product-actions .tfm-btn-outline {
    background: var(--tfm-orange-light);
    border-color: rgba(226, 104, 15, 0.35);
    color: var(--tfm-orange-dark);
}
.tfm-product-actions .tfm-btn-outline:hover {
    background: #FFE8D3;
    border-color: var(--tfm-orange);
    color: var(--tfm-orange-dark);
}

/* ---------- Shop page ---------- */
/* The page hero is a white band now, so every inherited white-on-dark colour
   from the base stylesheet has to be brought back to ink. */
.tfm-page-hero {
    background: var(--tfm-white);
    border-bottom: 1px solid var(--tfm-gray);
    color: var(--tfm-text);
    padding: 30px 0 26px;
}
.tfm-page-hero::before { display: none; }
.tfm-page-hero .tfm-container { align-items: flex-start; text-align: left; }
h1.tfm-page-hero-title, .tfm-page-hero-title {
    color: var(--tfm-navy);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 700;
    margin: 10px 0 8px;
    letter-spacing: -0.02em;
}
.tfm-page-hero-subtitle {
    color: var(--tfm-text-light);
    font-size: 0.95rem;
    max-width: 75ch;
    margin: 0;
}
.tfm-page-hero-subtitle a { color: var(--tfm-green-dark); }
/* Breadcrumb above the title is how shoppers expect to navigate back up */
.tfm-page-hero-breadcrumb {
    order: -1;
    margin: 0 0 2px;
    font-size: 0.82rem;
    color: var(--tfm-text-muted);
    justify-content: flex-start;
}
.tfm-page-hero-breadcrumb a { color: var(--tfm-green-dark); }
.tfm-page-hero-breadcrumb a:hover { color: var(--tfm-orange-dark); }
.tfm-page-hero-breadcrumb i { color: var(--tfm-gray-medium); opacity: 1; }
.tfm-page-hero .tfm-hero-badge {
    background: var(--tfm-green-light);
    border-color: rgba(11, 107, 121, 0.25);
    color: var(--tfm-green-dark);
    margin-bottom: 0;
    order: -2;
}

.tfm-branch-tabs { gap: 8px; flex-wrap: wrap; }
.tfm-branch-tab { border-radius: var(--tfm-radius-md); }
@media (min-width: 768px) {
    /* Scope tabs sit at their natural width - stretched full-bleed they read
       as three primary buttons rather than a set of filters. */
    .tfm-branch-tab { flex: 0 0 auto; padding: 10px 18px; }
}
.tfm-shop-resultbar {
    border-bottom: none;
    padding: 14px 0 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.tfm-shop-result-count { font-size: 0.9rem; }
.tfm-shop-filter-toggle { border-radius: var(--tfm-radius-md); border-width: 1px; font-weight: 650; }

/* Sorting - a list this long is unusable without it */
.tfm-shop-sort { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.tfm-shop-sort label { font-size: 0.84rem; color: var(--tfm-text-muted); font-weight: 550; }
.tfm-shop-sort select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--tfm-white) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235C6B73' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid var(--tfm-gray-medium);
    border-radius: var(--tfm-radius-md);
    padding: 9px 34px 9px 12px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tfm-text);
    min-height: 40px;
    cursor: pointer;
}
.tfm-shop-sort select:focus { outline: none; border-color: var(--tfm-green); box-shadow: 0 0 0 3px rgba(11, 107, 121, 0.12); }

.tfm-shop-filters-panel.active { margin-bottom: 20px; }
.tfm-shop-search input { border-radius: var(--tfm-radius-md); border-width: 1px; }
.tfm-shop-search input:focus { border-color: var(--tfm-green); box-shadow: 0 0 0 3px rgba(11, 107, 121, 0.12); }
.tfm-filter-btn { border-radius: var(--tfm-radius-full); }
.tfm-shop-empty { color: var(--tfm-text-light); }

/* ---------- Quick view ---------- */
.tfm-modal-overlay { background: rgba(19, 32, 44, 0.55); }
.tfm-modal { border-radius: var(--tfm-radius-lg); }
.tfm-modal-gallery { background: var(--tfm-white); border-right: 1px solid var(--tfm-gray); }
.tfm-modal-gallery-stage img { object-fit: contain; padding: 14px; }
.tfm-qv-price-main { font-family: var(--tfm-font-heading); font-size: 1.6rem; }
.tfm-qv-chip { background: var(--tfm-gray-light); color: var(--tfm-text-light); border: 1px solid var(--tfm-gray); font-weight: 600; }

/* ---------- Forms ---------- */
.tfm-form-group input, .tfm-form-group select, .tfm-form-group textarea {
    border-radius: var(--tfm-radius-md);
}
.tfm-form-group input:focus, .tfm-form-group select:focus, .tfm-form-group textarea:focus {
    border-color: var(--tfm-green);
    box-shadow: 0 0 0 3px rgba(11, 107, 121, 0.12);
}

/* ---------- CTA band ---------- */
.tfm-cta-section { background: var(--tfm-navy); }
.tfm-cta-content h2 { color: #fff; }

/* ---------- Footer ---------- */
.tfm-footer { background: var(--tfm-navy); }
.tfm-footer-top { padding: 48px 0 32px; }
.tfm-footer-title { font-size: 0.9rem; font-weight: 650; letter-spacing: 0; }
.tfm-footer-links a:hover { color: var(--tfm-orange); }
.tfm-footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); }

/* ---------- Mobile bottom nav ---------- */
.tfm-bottom-nav { box-shadow: 0 -1px 0 var(--tfm-gray); border-top: 1px solid var(--tfm-gray); }
.tfm-bottom-nav-item { font-size: 0.68rem; font-weight: 600; padding: 8px 4px 7px; }
.tfm-bottom-nav-item.active { color: var(--tfm-green-dark); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 992px) {
    .tfm-product-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1200px) {
    .tfm-product-grid { grid-template-columns: repeat(5, 1fr); }
    .tfm-category-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 900px) {
    .tfm-hero--split .tfm-hero-container {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 22px 16px 58px;
    }
    /* Banner leads on a phone - it is the thing people recognise */
    .tfm-hero-media { order: -1; border-radius: 14px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32); }
    .tfm-hero--split .tfm-hero-slides { inset: 7px; }
    .tfm-hero--split .tfm-hero-panel { max-width: none; padding-left: 14px; }
    .tfm-hero--split .tfm-hero-carousel-arrow { width: 30px; height: 30px; font-size: 0.72rem; }
    .tfm-hero--split .tfm-hero-carousel-prev { left: 12px; }
    .tfm-hero--split .tfm-hero-carousel-next { right: 12px; }
    .tfm-hero--split .tfm-hero-carousel-dots { bottom: 14px; }
    .tfm-hero--split .tfm-hero-scroll { display: none; }
}

@media (min-width: 601px) and (max-width: 900px) {
    /* Stacked but not stretched: a full-width 4:3 frame swamps a tablet */
    .tfm-hero-media { max-width: 560px; margin: 0 auto; width: 100%; }
    .tfm-hero--split .tfm-hero-panel { max-width: 640px; }
    .tfm-hero--split .tfm-hero-actions .tfm-btn { flex: 0 1 auto; }
}

@media (max-width: 1100px) {
    .tfm-header-search { max-width: 340px; }
    .tfm-header-search-label { display: none; }
    .tfm-header-search button { padding: 0 15px; }
}

@media (max-width: 991px) {
    /* Search moves to its own row so it stays full-width and tappable */
    .tfm-nav-wrapper { flex-wrap: wrap; gap: 12px; }
    .tfm-header-search { order: 3; flex: 1 0 100%; max-width: none; margin: 0; }
    .tfm-header-search button { min-width: 54px; justify-content: center; }
    .tfm-logo { margin-right: auto; }
    .tfm-nav-link.active { box-shadow: none; }
}

@media (max-width: 767px) {
    .tfm-body { font-size: 15px; }
    .tfm-section { padding: 36px 0; }
    .tfm-section-header { margin-bottom: 20px; }
    .tfm-hero-container { text-align: left; }
    .tfm-hero-panel { text-align: left; }
    .tfm-hero-tagline { margin-left: 0; margin-right: 0; }
    .tfm-hero-actions, .tfm-hero-perks { justify-content: flex-start; }

    .tfm-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .tfm-stat { padding: 12px 14px; border-bottom: 1px solid var(--tfm-gray); }
    .tfm-stat:nth-child(2n) { border-right: none; }
    .tfm-stat:nth-last-child(-n+2) { border-bottom: none; }

    .tfm-product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .tfm-category-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .tfm-product-body { padding: 11px; }
    .tfm-product-name { font-size: 0.85rem; min-height: 2.5em; }
    .tfm-product-price { font-size: 1.1rem; }
    .tfm-product-finance { font-size: 0.74rem; }
    .tfm-product-ship { font-size: 0.72rem; }
    .tfm-img-wrap img { padding: 8px; }

    .tfm-catrail-inner { padding: 7px 16px; }
    .tfm-catrail-link.tfm-catrail-lipa { margin-left: 0; }

    .tfm-shop-resultbar { padding: 12px 0 8px; }
    .tfm-shop-sort { width: 100%; margin-left: 0; order: 3; }
    .tfm-shop-sort select { flex: 1; }
}

@media (max-width: 420px) {
    .tfm-category-grid { grid-template-columns: repeat(2, 1fr); }
    .tfm-product-actions .tfm-btn { font-size: 0.78rem; padding: 9px 8px; }
    .tfm-header-search input { font-size: 16px; } /* stops iOS zooming on focus */
}

@media (prefers-reduced-motion: reduce) {
    .tfm-product-card:hover .tfm-img-wrap img { transform: none; }
    .tfm-catrail { transition: none; }
}
