
/*
Theme Name: Trutlands 2025 Child Theme #2
Template: twentytwentyfive
Description: A child theme of Twenty Twenty-Five for the Trutlands site.
Author: Trutlands
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tr
*/

/* ----------------------------------------
   Header / Navigation Bar
   ---------------------------------------- */

/* Sticky header with shadow */
.tr-header {
    z-index: 999 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    width: 100%;
}

.tr-header .wp-block-navigation {
    /* Fix for broken dropdowns: ensure the container can expand to show submenus */
    overflow: visible !important;
}
/* Nav link styling */
.tr-header .wp-block-navigation a {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #222;
    padding: 0 10px;
    position: relative;
    transition: color 0.2s;
    line-height: 72px;
    background: none;
    white-space: nowrap;
    text-decoration: none;
}

.tr-header .wp-block-navigation a:hover,
.tr-header .wp-block-navigation .current-menu-item > a {
    color: #1a7e3c;
}

.tr-header .wp-block-navigation a::after {
    content: '';
    display: block;
    height: 3px;
    width: 0;
    background: #1a7e3c;
    transition: width 0.2s;
    position: absolute;
    left: 0;
    bottom: 18px;
}

.tr-header .wp-block-navigation a:hover::after,
.tr-header .wp-block-navigation .current-menu-item > a::after {
    width: 100%;
}

/* Remove the focus box that lingers after a mouse/touch click,
   while keeping it for keyboard navigation (:focus-visible) for a11y. */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.wp-element-button:focus:not(:focus-visible),
.wp-block-navigation-item__content:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}

.tr-header .wp-block-navigation ul {
    flex-wrap: nowrap !important;
}

.tr-header-inner {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 14px;
}


/* Header icon buttons */
.tr-header-icons {
    align-items: center;
}

.tr-header-icons a {
    text-decoration: none;
    font-size: 1.1rem;
}

.tr-header-icons .wp-block-search__button {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
    cursor: pointer;
}

.tr-header-icons .wp-block-search__button svg {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: block;
    margin: 0 auto;
    padding-top: 5px;
}
/* Make the search icon (svg#search-icon) bigger and vertically centered */
.tr-search-toggle--custom .wp-block-search__button svg {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: block;
    margin: 0 auto;
}

.tr-search-toggle--custom .wp-block-search__button {
    height: 48px !important;
    width: 48px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

/* Responsive logo size */
.tr-header .wp-block-site-logo {
  flex: 0 0 auto;
  max-width: 160px;
}

.tr-header .wp-block-site-logo img {
  width: 100%;
  height: auto;
}

@media (max-width: 900px) {
    .tr-header-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .tr-header .wp-block-navigation {
        margin-left: 0;
    }
}

/* Phone icon */
.tr-phone-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

/* --- RESPONSIVE LOGO SWAP --- */
.tr-header .wp-block-site-logo img {
    content: url('https://webgility.trutlands.com/wp-content/uploads/2018/03/T-Rutlands-Logo-min.png');
    max-width: 180px;
    height: auto;
    display: block;
    transition: content 0.2s;
}
@media (max-width: 900px) {
    .tr-header .wp-block-site-logo img {
        content: url('https://webgility.trutlands.com/wp-content/uploads/2018/03/T.Rutlands-mobile-Logo-min.png');
        max-width: 110px;
    }
}

.tr-phone-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Hide phone icon text on mobile, show icon only */
@media (max-width: 781px) {
    .tr-header .wp-block-site-logo img {
        max-width: 120px;
    }
}

/* ========================================
   HEADER LAYOUT — RESPONSIVE FIXES
   ======================================== */

/* Main header row: proper flex distribution */
.tr-header > .wp-block-group > .wp-block-group.alignwide {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Nav + icons container: fill remaining space */
.tr-header .wp-block-group.alignwide > .wp-block-group:last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
  gap: 20px;
}

/* Navigation block: flexible width */
.tr-header .wp-block-navigation {
  flex: 1 1 auto;
  min-width: 0;
}

/* Nav items row */
.tr-header .wp-block-navigation__container {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}

/* --- MEDIUM SCREENS: allow text wrapping inside nav items --- */
@media (max-width: 1280px) {
  .tr-header .wp-block-navigation a {
    font-size: 15px;
    padding: 0 8px;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
  }

  .tr-header .wp-block-navigation__container {
    align-items: center;
  }
}

/* --- NARROWER: tighten further before mobile --- */
@media (max-width: 1140px) {
  .tr-header .wp-block-navigation a {
    font-size: 14px;
    padding: 0 6px;
    letter-spacing: 0.05em;
  }
}

/* --- EARLY MOBILE SWITCH: hamburger appears before items disappear --- */
@media (max-width: 1080px) {

  /* Hide the nav container ONLY when the overlay is closed */
  .tr-header .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
  }

  /* Show hamburger button */
  .tr-header .wp-block-navigation__responsive-container-open {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  /* When overlay IS open, make sure menu items are visible */
  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__container {
    display: flex !important;
    flex-direction: column;
  }

  .tr-header-icons {
    display: flex;
    gap: 12px;
  }
}

/* --- TRUE MOBILE --- */
@media (max-width: 600px) {
  .tr-header > .wp-block-group > .wp-block-group.alignwide {
    padding: 0 12px;
  }

  .tr-header .wp-block-site-logo {
    max-width: 130px;
  }

  .tr-header-icons {
    gap: 10px;
  }
}

/* ========================================
   DROPDOWN / SUBMENU OVERRIDES
   ======================================== */

/* Submenu container */
.tr-header .wp-block-navigation__submenu-container {
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  min-width: 220px;
  padding: 0.4rem 0;
  z-index: 1001;
}

/* Override the main nav link styles for submenu links */
.tr-header .wp-block-navigation__submenu-container a {
  line-height: 1.4;
  padding: 0.5rem 1rem;
  font-size: 14px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  display: block;
}

/* Remove the green underline animation from submenu links */
.tr-header .wp-block-navigation__submenu-container a::after {
  display: none;
}

/* ========================================
   MOBILE NAV OVERLAY — legacy centered dropdown
   Turns the core full-screen overlay into a centered panel that drops
   down below the header, keeps the logo visible, and gives KITS /
   INFORMATION tap-to-expand submenus (see assets/js/nav-mobile.js).
   ======================================== */

@media (max-width: 1080px) {

  /* Offset from the top of the viewport to the bottom of the sticky header.
     Tune this single value if the panel overlaps or gaps the header. */
  :root {
    --tr-mobile-nav-top: 88px;
  }

  /* Re-anchor the overlay as a dropdown panel instead of a full-screen sheet */
  .tr-header .wp-block-navigation__responsive-container.is-menu-open {
    position: fixed;
    top: var(--tr-mobile-nav-top);
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: auto;
    max-height: calc(100vh - var(--tr-mobile-nav-top));
    overflow-y: auto;
    padding: 0.5rem 0 1.25rem;
    background: #fff;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
    /* Sit just under the sticky header (z-index 999) so the logo stays visible */
    z-index: 998;
    /* Core drives overlay alignment from these vars; force center */
    --navigation-layout-justify: center;
    --navigation-layout-align: center;
    --navigation-layout-justification-setting: center;
  }

  /* Make every core wrapper span the full panel width so items truly center */
  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-close,
  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-dialog,
  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content {
    display: block !important;
    padding: 0;
  }

  /* When the panel is open, swap the header hamburger for the close (X):
     hide the open button and lift the close button up into the header bar. */
  .tr-header .wp-block-navigation.is-menu-open
    .wp-block-navigation__responsive-container-open,
  .tr-header
    .wp-block-navigation:has(.wp-block-navigation__responsive-container.is-menu-open)
    .wp-block-navigation__responsive-container-open {
    visibility: hidden;
  }

  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-close {
    position: fixed;
    top: calc(var(--tr-mobile-nav-top) / 2);
    right: 1rem;
    transform: translateY(-50%);
    z-index: 1000;
    color: #222;
  }

  /* Center every top-level item, stacked, with breathing room on the sides.
     !important overrides the block's built-in justifyContent:right layout. */
  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__container {
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    gap: 0;
    padding: 0 1.5rem;
  }

  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item {
    display: block !important;
    position: relative;
    width: 100% !important;
    margin: 0 !important;
    text-align: center !important;
  }

  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item__content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin: 0 !important;
    line-height: 1.4 !important;
    padding: 0.75rem 0 !important;
  }

  /* Drop the green underline animation inside the overlay */
  .tr-header .wp-block-navigation__responsive-container.is-menu-open a::after {
    display: none !important;
  }

  /* Hide the core hover chevron; our green SVG caret replaces it */
  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__submenu-icon {
    display: none !important;
  }

  /* Green caret toggle (injected by nav-mobile.js), inline beside the label */
  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .tr-mobile-submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-left: 10px;
    padding: 8px;
    background: transparent;
    border: 0;
    color: #1c9d51;
    cursor: pointer;
    transition: transform 0.3s ease;
  }

  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .tr-mobile-submenu-toggle svg {
    display: block;
    width: 16px;
    height: 16px;
  }

  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .tr-submenu-open > .tr-mobile-submenu-toggle {
    transform: rotate(180deg);
  }

  /* Collapse submenus by default; no shading, centered, flat */
  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__submenu-container {
    display: none;
    position: static !important;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .tr-submenu-open > .wp-block-navigation__submenu-container {
    display: block;
  }

  .tr-header .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    justify-content: center;
    padding: 0.5rem 0 !important;
    font-size: 14px;
    color: #555;
  }
}

/* ========================================
   BLOG "READ MORE" BUTTON (Italian flag style)
   ======================================== */

/* Wrapper — controls spacing */
.wp-block-post-excerpt__more-text {
  margin-top: 1rem;
}

/* The link itself */
.wp-block-post-excerpt__more-link {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: transparent;
  color: #333;
  text-decoration: none;
  text-transform: uppercase;
  font-family: 'Nunito', Arial, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  transition: border-color 0.3s ease, background 0.2s ease;
}

/* Italian flag borders on hover */
.wp-block-post-excerpt__more-link:hover,
.wp-block-post-excerpt__more-link:focus {
  border-top-color: #009246;
  border-bottom-color: #ce2b37;
  background: rgba(0, 0, 0, 0.02);
  color: #333;
  text-decoration: none;
}

/* ----------------------------------------
   Ferrari Parts Page Template
   ---------------------------------------- */

.ferrari-parts-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--wp--preset--spacing--30, 1.5rem);
}

.ferrari-parts-header {
    text-align: center;
    padding: var(--wp--preset--spacing--50, 3rem) 0 var(--wp--preset--spacing--40, 2rem);
}

.ferrari-parts-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* Decade sections */
.ferrari-decade-section {
    margin-bottom: var(--wp--preset--spacing--50, 3rem);
}

.ferrari-decade-heading {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 3px solid #c00;
    padding-bottom: 0.5rem;
    margin-bottom: var(--wp--preset--spacing--30, 1.5rem);
}

/* Card grid */
.ferrari-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--wp--preset--spacing--30, 1.5rem);
}

/* Individual card */
.ferrari-model-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.ferrari-model-card:hover {
    transform: translateY(-4px);
}

.ferrari-model-card:focus-visible {
    outline: 2px solid #c00;
    outline-offset: 2px;
}

/* Card image */
.ferrari-model-image {
    overflow: hidden;
    background: #f0f0f0;
}

.ferrari-model-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.ferrari-model-card:hover .ferrari-model-image img {
    transform: scale(1.05);
}

.ferrari-model-placeholder {
    width: 100%;
    height: 100%;
    background: #e0e0e0;
}

/* Card title */
.ferrari-model-name {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    padding: 0.75rem 0.5rem;
    margin: 0;
    letter-spacing: 0.03em;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .ferrari-models-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .ferrari-model-name {
        font-size: 0.75rem;
        padding: 0.5rem 0.25rem;
    }
}

/* ----------------------------------------
   Single Product - "Also Fits" Category List
   ---------------------------------------- */

.tr-also-fits {
    margin-top: 1rem;
}

.tr-also-fits-heading {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tr-also-fits-list {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0;
}

.tr-also-fits-list li {
    padding: 0.15rem 0;
}

.tr-also-fits-list a {
    text-decoration: none;
}

.tr-also-fits-list a:hover {
    text-decoration: underline;
}

/* ----------------------------------------
   Green Bar (non-homepage header accent)
   ---------------------------------------- */

.tr-green-bar {
    height: 8px;
    background: #00a651;
    width: 100%;
}

/* ----------------------------------------
   Parts Search Bar (shop pages)
   ---------------------------------------- */

.tr-parts-search {
    background: #1a1a1a;
    width: 100%;
    padding: 1.5rem 0;
}

.tr-parts-search-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.tr-parts-search-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0 0 1rem;
    letter-spacing: 0.02em;
}

.tr-parts-search-dropdowns {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.tr-parts-select {
    appearance: none;
    -webkit-appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 1rem center;
    border: 2px solid #c00;
    border-radius: 0;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 1rem;
    min-width: 280px;
    color: #333;
    cursor: pointer;
}

.tr-parts-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tr-parts-select:focus {
    outline: 2px solid #c00;
    outline-offset: 1px;
}

/* Red bar below search section */
.tr-parts-search::after {
    content: '';
    display: block;
    height: 8px;
    background: #c00;
    margin-top: 1.5rem;
}

@media (max-width: 600px) {
    .tr-parts-search-dropdowns {
        flex-direction: column;
        align-items: center;
    }

    .tr-parts-select {
        min-width: 100%;
        max-width: 100%;
    }
}

/* ----------------------------------------
   Product Category Page – Layout
   ---------------------------------------- */

.tr-category-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--wp--preset--spacing--30, 1.5rem);
}

.tr-category-header {
    padding: var(--wp--preset--spacing--40, 2rem) 0 var(--wp--preset--spacing--30, 1.5rem);
}

.tr-category-breadcrumb {
    font-size: 0.95rem;
    font-weight: 400;
    margin: 0 0 0.25rem;
    color: #555;
}

.tr-category-breadcrumb a {
    color: #555;
    text-decoration: none;
}

.tr-category-breadcrumb a:hover {
    color: #000;
    text-decoration: underline;
}

.tr-category-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.tr-category-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    max-width: 800px;
}

.tr-category-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--wp--preset--spacing--40, 2rem);
    align-items: start;
    padding-bottom: var(--wp--preset--spacing--50, 3rem);
}

/* ----------------------------------------
   Parts Categories Sidebar
   ---------------------------------------- */

.tr-parts-sidebar {
    position: sticky;
    top: 100px; /* below sticky header */
}

.tr-sidebar-header {
    background: #00a651;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.75rem 1rem;
}

.tr-sidebar-categories {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #ddd;
    border-top: none;
}

.tr-sidebar-cat {
    border-bottom: 1px solid #eee;
}

.tr-sidebar-cat:last-child {
    border-bottom: none;
}

.tr-sidebar-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tr-sidebar-cat-link {
    flex: 1;
    display: block;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #333;
    text-decoration: none;
}

.tr-sidebar-cat-link:hover {
    background: #f5f5f5;
    color: #000;
}

.tr-sidebar-cat.is-active > .tr-sidebar-cat-row > .tr-sidebar-cat-link {
    font-weight: 700;
    color: #000;
}

/* Toggle button (circled +/−) */
.tr-sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.tr-sidebar-toggle:hover {
    color: #333;
}

.tr-toggle-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-radius: 50%;
    position: relative;
}

/* Horizontal bar of the plus */
.tr-toggle-icon::before,
.tr-toggle-icon::after {
    content: '';
    position: absolute;
    background: currentColor;
}

.tr-toggle-icon::before {
    width: 10px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Vertical bar of the plus (collapses to minus) */
.tr-toggle-icon::after {
    width: 2px;
    height: 10px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
}

.tr-sidebar-toggle[aria-expanded="true"] .tr-toggle-icon::after {
    transform: translate(-50%, -50%) scaleY(0);
}

/* Subcategory list */
.tr-sidebar-subcats {
    list-style: none;
    margin: 0;
    padding: 0 0 0.5rem;
}

.tr-sidebar-subcat a {
    display: block;
    padding: 0.35rem 1rem 0.35rem 2rem;
    font-size: 0.82rem;
    color: #555;
    text-decoration: none;
}

.tr-sidebar-subcat a:hover {
    color: #000;
    text-decoration: underline;
}

.tr-sidebar-subcat.is-active a {
    font-weight: 700;
    color: #000;
}

.tr-sidebar-bullet {
    color: #00a651;
    font-size: 1.1em;
    margin-right: 0.3em;
}

/* ----------------------------------------
   Product Grid in Category Sidebar Layout
   ---------------------------------------- */

.tr-category-products .woocommerce-result-count,
.tr-category-products .woocommerce-ordering {
    margin-bottom: 1rem;
}

.tr-category-products ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Remove clearfix pseudo-elements that become empty grid cells */
.tr-category-products ul.products::before,
.tr-category-products ul.products::after {
    content: none;
    display: none;
}

.tr-category-products ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
}

/* Add to Cart button – red outline style from design */
.tr-category-products ul.products li.product .button {
    border: 2px solid #c00;
    background: transparent;
    color: #c00;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: background 0.2s ease, color 0.2s ease;
}

.tr-category-products ul.products li.product .button:hover {
    background: #c00;
    color: #fff;
}
/* View Cart button – green outline style from design */
.tr-category-products ul.products li.product a.added_to_cart {
display: inline-block;
border: 3px solid #1c9d51;
background: #eaf4ff;
color: #1c9d51;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.03em;
text-decoration: none;
padding: 0.55em 1em;
margin: 0.75rem 0 0 0.75rem
border-radius: 2px;
transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tr-category-products ul.products li.product a.added_to_cart:hover,
.tr-category-products ul.products li.product a.added_to_cart:focus-visible {
background: #1c9d51;
border-color: #1c9d51;
color: #fff;
}



/* ----------------------------------------
   Responsive – Product Category Sidebar
   ---------------------------------------- */

@media (max-width: 768px) {
    .tr-category-layout {
        grid-template-columns: 1fr;
    }

    .tr-parts-sidebar {
        position: static;
    }

    .tr-sidebar-header {
        cursor: pointer;
        position: relative;
    }

    .tr-sidebar-header::after {
        content: '▼';
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.7em;
    }

    .tr-parts-sidebar.is-collapsed .tr-sidebar-categories {
        display: none;
    }

    .tr-parts-sidebar.is-collapsed .tr-sidebar-header::after {
        content: '▶';
    }

    .tr-category-products ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .tr-category-products ul.products {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------
   Bootstrap Utility Classes (minimal set for home page)
   ---------------------------------------- */

.position-relative { position: relative; }
.position-absolute { position: absolute; }
.h-100 { height: 100%; }
.w-100 { width: 100%; }
.p-4 { padding: 1.5rem; }
.pt-4 { padding-top: 1.5rem; }
.px-4 { padding-left: 1.5rem; padding-right: 1.5rem; }
.pb-0 { padding-bottom: 0; }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.text-white { color: #fff; }
.text-uppercase { text-transform: uppercase; }

.row { display: flex; flex-wrap: wrap; }
.no-gutters { margin-left: 0; margin-right: 0; }
.no-gutters > .col,
.no-gutters > [class*="col-"] { padding-left: 0; padding-right: 0; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

.container-fluid { width: 100%; margin-left: auto; margin-right: auto; }

@media (min-width: 992px) {
    .p-lg-5 { padding: 3rem; }
    .pt-lg-5 { padding-top: 3rem; }
    .px-lg-5 { padding-left: 3rem; padding-right: 3rem; }
    .py-lg-3 { padding-top: 1rem; padding-bottom: 1rem; }
    .mb-lg-5 { margin-bottom: 3rem; }
    .col-lg { flex-basis: 0; flex-grow: 1; max-width: 100%; }
}

/* ----------------------------------------
   Home Page - Hero
   ---------------------------------------- */

#home-hero {
    position: relative;
    overflow: hidden;
}

.tr-hero-slides {
    position: relative;
    height: 75vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
}

.tr-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 0;
}

.tr-slide--active {
    opacity: 1;
    z-index: 1;
}

.tr-slide__overlay {
    position: absolute;
    inset: 0;
    background: #000;
    pointer-events: none;
}

.tr-slide__content {
    position: relative;
    z-index: 2;
    text-align: left;
    max-width: 600px;
}

.tr-slide__content .heading h2,
.tr-slide__content h1 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1rem;
    line-height: 1.15;
}

.tr-slide__content .text p {
    color: #fff;
    font-size: 1.2rem;
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

.tr-slide__btn {
    display: inline-block;
    padding: 0.6rem 1.75rem;
    background: transparent;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 0.08em;
    border: none;
    border-top: 3px solid #009246;
    border-bottom: 3px solid #ce2b37;
    transition: background 0.2s;
}

.tr-slide__btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* ----------------------------------------
   Home Page - Trifold Sections (matches old theme)
   ---------------------------------------- */

.trifold-sections {
    padding: 14px 0;
    background-color: #fff;
}

@media (min-width: 1240px) {
    .trifold-sections {
        padding: 50px 0;
    }
}

.trifold-section {
    padding: 14px 0;
    padding-left: 75px;
}

@media (min-width: 1240px) {
    .trifold-section {
        padding: 0;
    }
}

.trifold-section__title {
    text-transform: uppercase;
    padding-right: 5px;
    letter-spacing: 0.2em;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    padding-left: 75px;
    margin-bottom: 0.4em;
}

@media (min-width: 1640px) {
    .trifold-section__title {
        font-size: 23px;
        padding-left: 150px;
    }
}

.trifold-section__line {
    height: 3px;
    position: relative;
}

.trifold-section--green .trifold-section__line {
    background-color: #1c9d51;
}

.trifold-section--white .trifold-section__line {
    background-color: #d9d7d7;
}

.trifold-section--red .trifold-section__line {
    background-color: #ed1c24;
}

.trifold-section__line__image {
    position: absolute;
    left: 0;
    width: 75px;
    height: 75px;
    background-size: 70%;
    background-position: center;
    background-repeat: no-repeat;
}

@media (min-width: 1640px) {
    .trifold-section__line__image {
        width: 150px;
        height: 150px;
        background-size: auto;
    }
}

.trifold-section--green .trifold-section__line__image {
    background-image: url("/wp-content/uploads/green-ribbon.png");
    top: -27px;
}

@media (min-width: 1640px) {
    .trifold-section--green .trifold-section__line__image {
        top: -57px;
    }
}

.trifold-section--white .trifold-section__line__image {
    background-image: url("/wp-content/uploads/superior-service.png");
    top: -36px;
}

@media (min-width: 1640px) {
    .trifold-section--white .trifold-section__line__image {
        top: -75px;
    }
}

.trifold-section--red .trifold-section__line__image {
    background-image: url("/wp-content/uploads/fast-shipping.png");
    top: -38px;
    left: -10px;
}

@media (min-width: 1640px) {
    .trifold-section--red .trifold-section__line__image {
        top: -78px;
        left: -20px;
    }
}

.trifold-section__content {
    margin-top: 1.4em;
    padding-left: 75px;
    padding-right: 5px;
    line-height: 1.4em;
    letter-spacing: 0.1em;
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
}

@media (min-width: 1640px) {
    .trifold-section__content {
        font-size: 20px;
        padding-left: 150px;
    }
}

/* ----------------------------------------
   Home Page - SEO Section (was Elementor)
   ---------------------------------------- */

/* Include padding in width so full-width padded containers don't overflow
   the viewport (prevents horizontal scroll on the home page). */
#content.container-fluid,
.home-seo,
.home-seo__content,
.tr-slide__content,
#testimonials,
.row,
[class*="col-"] {
    box-sizing: border-box;
    max-width: 100%;
}

.home-seo {
    min-height: 200px;
    overflow-x: hidden;
}

@media (min-width: 1240px) {
    .home-seo {
        background-image: url("/wp-content/uploads/2020/12/home-about-background-image-2.jpg");
        background-size: cover;
        background-position: center right;
        background-repeat: no-repeat;
        box-shadow: -10px -4px 7px 0 rgba(0, 0, 0, 0.15);
    }
}

.home-seo .home-seo__gradient {
    background: linear-gradient(to right, white 0%, rgba(255, 255, 255, 0.75) 80%, rgba(255, 255, 255, 0.3) 100%);
}

@media (min-width: 768px) {
    .home-seo .home-seo__gradient {
        background: linear-gradient(to right, white 0%, rgba(255, 255, 255, 0.8) 75%, rgba(255, 255, 255, 0.1) 100%);
    }
}

@media (min-width: 1240px) {
    .home-seo .home-seo__gradient {
        background: linear-gradient(to right, white 0%, rgba(255, 255, 255, 0.1) 66%);
    }
}

.home-seo .home-seo__content {
    position: relative;
    width: 100%;
}

@media (min-width: 1240px) {
    .home-seo .home-seo__content {
        width: 45%;
    }
}

.home-seo__heading {
    color: #ce2b37;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
    margin: 0 0 1rem;
    overflow-wrap: break-word;
}

.home-seo__text {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

.home-seo .tr-slide__btn {
    color: #333;
}

.home-seo .tr-slide__btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

/* ----------------------------------------
   Home Page - Testimonials
   ---------------------------------------- */

#testimonials {
    position: relative;
    background-color: #161616;
    text-align: center;
}

#testimonials .testimonials__horse {
    position: absolute;
    top: -45px;
    left: 0;
    height: 300px;
    width: 100%;
    background-image: url("/wp-content/themes/trutlands/images/dark-grey-horse.png");
    background-position: center left;
    background-size: contain;
    background-repeat: no-repeat;
}

@media (min-width: 576px) {
    #testimonials .testimonials__horse {
        top: unset;
        bottom: 0;
        height: 110%;
    }
}

#testimonials h2 {
    position: relative;
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tr-testimonial-slider {
    position: relative;
    min-height: 200px;
    max-width: 70%;
    margin: 0 auto;
}

@media (min-width: 1240px) {
    .tr-testimonial-slider {
        max-width: 75%;
    }
}

.tr-testimonial-item {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    text-align: center;
}

.tr-testimonial-item--active {
    opacity: 1;
    position: relative;
}

.tr-testimonial-item p {
    color: #fff;
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.8;
}

.tr-testimonial-item .text-uppercase {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ----------------------------------------
   Home Page - Partners Logo Carousel
   ---------------------------------------- */

#partner-links-container h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tr-partners-logos {
    overflow: hidden;
    position: relative;
}

.tr-partners-track {
    display: flex;
    align-items: center;
    gap: 3rem;
    animation: tr-scroll 30s linear infinite;
    width: max-content;
}

.tr-partners-track img {
    height: 100px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s, opacity 0.3s;
}

.tr-partners-track img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes tr-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pause on hover */
.tr-partners-logos:hover .tr-partners-track {
    animation-play-state: paused;
}

@media (max-width: 600px) {
    .tr-partners-track img {
        height: 60px;
        max-width: 200px;
    }

    .tr-partners-track {
        gap: 2rem;
    }
}

/* ----------------------------------------
   Footer
   ---------------------------------------- */

.tr-footer {
    background-color: #1a1a1a;
    padding: 3rem 3rem 1.5rem;
    font-size: 0.9rem;
}

.tr-footer-inner {
    display: grid;
    grid-template-columns: auto 1fr 1fr auto;
    gap: 2rem 3rem;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 991px) {
    .tr-footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 575px) {
    .tr-footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.tr-footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tr-footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    transition: opacity 0.2s;
}

.tr-footer-contact-item:hover {
    opacity: 0.7;
    color: #fff;
}

.tr-footer-contact-item svg {
    width: 18px;
    height: 18px;
    fill: #ce2b37;
    flex-shrink: 0;
}

.tr-footer-location {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.tr-footer-location svg {
    width: 18px;
    height: 18px;
    fill: #ce2b37;
    flex-shrink: 0;
    margin-top: 2px;
}

.tr-footer-address {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.tr-footer-address span {
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.tr-footer-social {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-self: end;
}

@media (max-width: 575px) {
    .tr-footer-social {
        justify-self: center;
    }
}

.tr-footer-social-icon {
    display: inline-flex;
    transition: opacity 0.2s;
}

.tr-footer-social-icon:hover {
    opacity: 0.7;
}

.tr-footer-social-icon svg {
    width: 36px;
    height: 36px;
    fill: #ce2b37;
}

.tr-footer-copyright {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #333;
}

.tr-footer-copyright p {
    color: #999;
    font-size: 0.8rem;
    margin: 0;
}


/* Consolidated: Constrain and align main content, post title, and Yoast breadcrumbs to match content area */

.wp-site-blocks .entry-content.alignfull.wp-block-post-content.is-layout-constrained.wp-block-post-content-is-layout-constrained,
.wp-site-blocks > .entry-content.alignfull.wp-block-post-content.is-layout-constrained.wp-block-post-content-is-layout-constrained,
.wp-site-blocks .entry-content.alignfull.wp-block-post-content.is-layout-constrained.wp-block-post-content-is-layout-constrained > *,
.wp-site-blocks .wp-block-post-title,
#breadcrumb {
    max-width: 1140px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    text-align: left !important;
}

@media (max-width: 1200px) {
    .wp-site-blocks .entry-content.alignfull.wp-block-post-content.is-layout-constrained.wp-block-post-content-is-layout-constrained,
    .wp-site-blocks > .entry-content.alignfull.wp-block-post-content.is-layout-constrained.wp-block-post-content-is-layout-constrained,
    .wp-site-blocks .entry-content.alignfull.wp-block-post-content.is-layout-constrained.wp-block-post-content-is-layout-constrained > *,
    .wp-site-blocks .wp-block-post-title,
    #breadcrumb {
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* Cap the post title size on smaller screens (overrides large font presets) */
@media (max-width: 781px) {
    .wp-site-blocks .wp-block-post-title {
        font-size: clamp(1.6rem, 6vw, 2.25rem) !important;
        line-height: 1.2 !important;
        word-break: break-word;
    }
}

#breadcrumb {
    text-transform: uppercase;
}

/* CSS for featured image hero layout on single posts (matches old theme) */
.featured-hero {
  position: relative;
}
.featured-hero .wp-block-post-featured-image {
  margin-bottom: 0;
}
.featured-hero .wp-block-post-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 6rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  background: rgba(0,0,0,0.2);
  padding: 1rem 2rem;
  border-radius: 8px;
  width: 100%;
  text-align: center !important;
  text-transform: uppercase;
  z-index: 2;
}
.featured-hero .wp-block-post-featured-image img {
  width: 100%;
  height: 400px; /* Adjust as needed */
  object-fit: cover;
  display: block;
}