/**
 * TV2 Ajax Search - Styles
 * High specificity to override WoodMart theme
 *
 * @package TV2_Ajax_Search
 * @version 2.1.1
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    --tv2-primary: #333333;
    --tv2-secondary: #666666;
    --tv2-accent: #0073aa;
    --tv2-border: #e0e0e0;
    --tv2-bg: #ffffff;
    --tv2-bg-hover: #f5f5f5;
    --tv2-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --tv2-radius: 8px;
}

/* ==========================================================================
   Search Form - Dropdown (Live Search)
   ========================================================================== */

.tv2-search {
    position: relative !important;
    width: 100% !important;
    display: block !important;
}

.tv2-search .tv2-search__input {
    width: 100% !important;
    padding: 12px 40px 12px 16px !important;
    font-size: 16px !important;
    border: 1px solid var(--tv2-border) !important;
    border-radius: var(--tv2-radius) !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.tv2-search .tv2-search__loader {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid var(--tv2-border) !important;
    border-top-color: var(--tv2-accent) !important;
    border-radius: 50% !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.tv2-search .tv2-search__loader--active {
    opacity: 1 !important;
    visibility: visible !important;
    animation: tv2-spin 0.8s linear infinite !important;
}

@keyframes tv2-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Dropdown */
.tv2-search .tv2-search__dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 999999 !important;
    background: #fff !important;
    border: 1px solid var(--tv2-border) !important;
    border-top: none !important;
    border-radius: 0 0 var(--tv2-radius) var(--tv2-radius) !important;
    box-shadow: var(--tv2-shadow) !important;
    max-height: 500px !important;
    overflow-y: auto !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.2s ease !important;
}

.tv2-search .tv2-search__dropdown--open {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.tv2-search .tv2-search__results {
    padding: 0 !important;
    margin: 0 !important;
}

/* Sections */
.tv2-search .tv2-search__section {
    border-bottom: 1px solid var(--tv2-border) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tv2-search .tv2-search__section-title {
    margin: 0 !important;
    padding: 12px 16px 8px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--tv2-secondary) !important;
    background: #fafafa !important;
}

.tv2-search .tv2-search__section-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Result Items */
.tv2-search .tv2-search__result-item {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.tv2-search .tv2-search__result-item:hover,
.tv2-search .tv2-search__result-item--selected {
    background: var(--tv2-bg-hover) !important;
}

.tv2-search .tv2-search__item-link {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    text-decoration: none !important;
    color: var(--tv2-primary) !important;
}

.tv2-search .tv2-search__item-image {
    flex-shrink: 0 !important;
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
    border-radius: 4px !important;
    background: #f0f0f0 !important;
}

.tv2-search .tv2-search__item-content {
    flex: 1 !important;
    min-width: 0 !important;
}

.tv2-search .tv2-search__item-title {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0 0 4px 0 !important;
    color: var(--tv2-primary) !important;
}

/* No yellow highlighting - plain text only */
.tv2-search .tv2-search__item-title mark {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-weight: inherit !important;
}

.tv2-search .tv2-search__item-category {
    display: block !important;
    font-size: 11px !important;
    color: var(--tv2-secondary) !important;
    margin-bottom: 4px !important;
}

.tv2-search .tv2-search__item-meta {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.tv2-search .tv2-search__item-price {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--tv2-accent) !important;
}

.tv2-search .tv2-search__item-rating {
    display: flex !important;
    gap: 2px !important;
}

.tv2-search .tv2-search__star {
    font-size: 12px !important;
}

.tv2-search .tv2-search__star--full {
    color: #ffc107 !important;
}

.tv2-search .tv2-search__star--empty {
    color: #ddd !important;
}

/* Show More Links (per section) */
.tv2-search .tv2-search__show-more {
    padding: 8px 16px 12px !important;
    text-align: right !important;
    background: #fafafa !important;
}

.tv2-search .tv2-search__show-more-link {
    display: inline-block !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    color: var(--tv2-accent) !important;
}

.tv2-search .tv2-search__show-more-link:hover {
    text-decoration: underline !important;
}

/* Show All Button */
.tv2-search .tv2-search__show-all {
    padding: 12px 16px !important;
    text-align: center !important;
    background: #fafafa !important;
    border-top: 1px solid var(--tv2-border) !important;
}

.tv2-search .tv2-search__show-all-link {
    display: inline-block !important;
    padding: 8px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    color: #fff !important;
    background: var(--tv2-accent) !important;
    border-radius: var(--tv2-radius) !important;
}

.tv2-search .tv2-search__no-results {
    padding: 24px 16px !important;
    text-align: center !important;
    color: var(--tv2-secondary) !important;
}

/* ==========================================================================
   Search Results Page - MAXIMUM SPECIFICITY - Override WoodMart
   ========================================================================== */

/* AGGRESSIVE Override of ALL WoodMart/Bootstrap parent containers */
body.search .main-page-wrapper,
body.search-results .main-page-wrapper,
body .main-page-wrapper:has(.tv2-search-results) {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.search .main-page-wrapper > .container,
body.search-results .main-page-wrapper > .container,
body.search .container,
body.search-results .container,
body .container:has(.tv2-search-results) {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.search .row.content-layout-wrapper,
body.search-results .row.content-layout-wrapper,
body.search .row,
body.search-results .row,
body .row:has(.tv2-search-results),
body .row.content-layout-wrapper:has(.tv2-search-results) {
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-wrap: nowrap !important;
}

/* Main search results container */
html body .tv2-search-results,
body .tv2-search-results {
    background: #f8f9fa !important;
    min-height: 100vh !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    float: none !important;
    display: block !important;
    position: relative !important;
}

body .tv2-search-results * {
    box-sizing: border-box !important;
}

body .tv2-search-results .tv2-container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    width: 100% !important;
}

/* Header */
body .tv2-search-results .tv2-search-results__header {
    background: #313131 !important;
    padding: 30px 0 !important;
    border-bottom: none !important;
    margin-bottom: 30px !important;
}

body .tv2-search-results .tv2-search-results__form {
    display: flex !important;
    max-width: 600px !important;
    margin: 0 auto 20px !important;
    background: #f5f5f5 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

body .tv2-search-results .tv2-search-results__input {
    flex: 1 !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
    border: none !important;
    background: transparent !important;
    outline: none !important;
}

body .tv2-search-results .tv2-search-results__submit {
    padding: 14px 20px !important;
    background: var(--tv2-accent) !important;
    border: none !important;
    color: #fff !important;
    cursor: pointer !important;
}

body .tv2-search-results .tv2-search-results__title {
    font-size: 24px !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin: 0 0 8px !important;
    color: #fff !important;
}

body .tv2-search-results .tv2-search-results__subtitle {
    font-size: 14px !important;
    color: rgba(255,255,255,0.7) !important;
    text-align: center !important;
    margin: 0 !important;
}

/* Layout - CRITICAL - FORCE FULL WIDTH */
body .tv2-search-results .tv2-search-results__layout {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 30px !important;
    align-items: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Sidebar - FORCE FIXED WIDTH */
body .tv2-search-results .tv2-search-results__sidebar {
    flex: 0 0 260px !important;
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    display: block !important;
}

/* Override any WoodMart container restrictions */
body .tv2-search-results .tv2-container,
body .tv2-search-results .container,
body .tv2-search-results .main-page-wrapper,
body .tv2-search-results > div {
    max-width: 1400px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Sidebar */
body .tv2-search-results .tv2-search-results__sidebar {
    flex-shrink: 0 !important;
    width: 260px !important;
    min-width: 260px !important;
    position: sticky !important;
    top: 20px !important;
}

body .tv2-search-results .tv2-filter-section {
    background: #fff !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
}

body .tv2-search-results .tv2-filter-section__title {
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #333 !important;
    margin: 0 0 12px !important;
    padding: 0 0 12px !important;
    border-bottom: 1px solid #eee !important;
}

body .tv2-search-results .tv2-filter-select {
    width: 100% !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    background: #fff !important;
}

body .tv2-search-results .tv2-filter-price {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
}

body .tv2-search-results .tv2-filter-price__input {
    flex: 1 !important;
    padding: 10px !important;
    font-size: 14px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    width: 70px !important;
    min-width: 70px !important;
}

body .tv2-search-results .tv2-filter-price__apply {
    width: 100% !important;
    padding: 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    background: #333 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
}

body .tv2-search-results .tv2-filter-brands {
    max-height: 280px !important;
    overflow-y: auto !important;
}

body .tv2-search-results .tv2-filter-brand {
    display: flex !important;
    align-items: center !important;
    padding: 8px 0 !important;
    cursor: pointer !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-size: 14px !important;
}

body .tv2-search-results .tv2-filter-brand input {
    margin-right: 10px !important;
}

body .tv2-search-results .tv2-filter-brand__name {
    flex: 1 !important;
}

body .tv2-search-results .tv2-filter-brand__count {
    font-size: 12px !important;
    color: #999 !important;
}

body .tv2-search-results .tv2-filter-brand--active {
    background: #e3f2fd !important;
    margin: 0 -20px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

body .tv2-search-results .tv2-filter-reset {
    display: block !important;
    margin-top: 12px !important;
    font-size: 13px !important;
    color: var(--tv2-accent) !important;
    text-decoration: none !important;
}

/* Main Content - FORCE WIDTH */
body .tv2-search-results .tv2-search-results__main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: calc(100% - 290px) !important;
    max-width: calc(100% - 290px) !important;
}

/* Results Sections */
body .tv2-search-results .tv2-results-section {
    background: #fff !important;
    border-radius: 8px !important;
    padding: 24px !important;
    margin-bottom: 24px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
}

body .tv2-search-results .tv2-results-section__title {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin: 0 0 20px !important;
    padding: 0 0 16px !important;
    border-bottom: 2px solid #f0f0f0 !important;
}

body .tv2-search-results .tv2-results-section__title svg {
    color: var(--tv2-accent) !important;
    flex-shrink: 0 !important;
}

body .tv2-search-results .tv2-results-section__count {
    font-weight: 400 !important;
    color: #999 !important;
    font-size: 14px !important;
}

/* Pages/Ratgeber Grid - 6 columns, 250px boxes */
body .tv2-search-results .tv2-results-grid--pages {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 12px !important;
    max-width: 100% !important;
}

body .tv2-search-results .tv2-page-card {
    width: 100% !important;
    height: 280px !important;
    display: flex !important;
    flex-direction: column !important;
    background: #fff !important;
    border: 1px solid #eee !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    text-decoration: none !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

body .tv2-search-results .tv2-page-card__image {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
    background: #f9f9f9 !important;
    overflow: hidden !important;
}

body .tv2-search-results .tv2-page-card__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

body .tv2-search-results .tv2-page-card__title {
    flex: 0 0 auto !important;
    padding: 10px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-align: center !important;
    line-height: 1.3 !important;
    color: #333 !important;
    background: #fff !important;
    border-top: 1px solid #eee !important;
    margin: 0 !important;
}

/* Page cards - images fully visible, not cropped */
body .tv2-search-results .tv2-page-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* Products Grid - 6 per row, images not cropped */
body .tv2-search-results .tv2-results-grid--products {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 16px !important;
    row-gap: 24px !important;
}

body .tv2-search-results .tv2-product-card {
    display: flex !important;
    flex-direction: column !important;
    background: #fff !important;
    border: 1px solid #eee !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    height: 100% !important;
}

body .tv2-search-results .tv2-product-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

body .tv2-search-results .tv2-product-card__link {
    display: flex !important;
    flex-direction: column !important;
    text-decoration: none !important;
    color: inherit !important;
    height: 100% !important;
}

body .tv2-search-results .tv2-product-card__image {
    aspect-ratio: 1 !important;
    background: #fff !important;
    overflow: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px !important;
}

body .tv2-search-results .tv2-product-card__image img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    padding: 0 !important;
}

body .tv2-search-results .tv2-product-card__placeholder {
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, #f5f5f5 25%, #e8e8e8 50%, #f5f5f5 75%) !important;
}

body .tv2-search-results .tv2-product-card__content {
    padding: 12px !important;
}

body .tv2-search-results .tv2-product-card__brand {
    display: block !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #999 !important;
    margin-bottom: 4px !important;
}

body .tv2-search-results .tv2-product-card__title {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    margin: 0 0 8px !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: 36px !important;
}

body .tv2-search-results .tv2-product-card__meta {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
}

body .tv2-search-results .tv2-product-card__grade {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 12px !important;
    color: #666 !important;
}

body .tv2-search-results .tv2-grade {
    display: inline-block !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #fff !important;
}

body .tv2-search-results .tv2-grade--excellent {
    background: #4caf50 !important;
}

body .tv2-search-results .tv2-grade--good {
    background: #8bc34a !important;
}

body .tv2-search-results .tv2-grade--ok {
    background: #ffc107 !important;
    color: #333 !important;
}

body .tv2-search-results .tv2-product-card__price {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--tv2-accent) !important;
}

/* Load More Button */
body .tv2-search-results .tv2-load-more {
    text-align: center !important;
    padding: 30px 0 !important;
    margin-top: 20px !important;
}

body .tv2-search-results .tv2-load-more__btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 14px 30px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: #0073aa !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}

body .tv2-search-results .tv2-load-more__btn:hover {
    background: #005a87 !important;
}

body .tv2-search-results .tv2-load-more__count {
    font-weight: 400 !important;
    opacity: 0.8 !important;
}

body .tv2-search-results .tv2-load-more__spinner {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    padding: 20px !important;
    color: #666 !important;
}

body .tv2-search-results .tv2-spinner {
    width: 24px !important;
    height: 24px !important;
    border: 3px solid #e0e0e0 !important;
    border-top-color: #0073aa !important;
    border-radius: 50% !important;
    animation: tv2-spin 0.8s linear infinite !important;
}

body .tv2-search-results .tv2-load-more__status {
    margin-top: 10px !important;
    font-size: 14px !important;
    color: #666 !important;
}

body .tv2-search-results .tv2-load-more__done {
    font-size: 14px !important;
    color: #28a745 !important;
    font-weight: 500 !important;
}

/* Pagination */
body .tv2-search-results .tv2-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 16px !important;
    margin-top: 30px !important;
    padding-top: 20px !important;
    border-top: 1px solid #eee !important;
}

body .tv2-search-results .tv2-pagination__link {
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    color: #333 !important;
    background: #f5f5f5 !important;
    border-radius: 6px !important;
}

body .tv2-search-results .tv2-pagination__link:hover {
    background: #e0e0e0 !important;
}

body .tv2-search-results .tv2-pagination__info {
    font-size: 14px !important;
    color: #666 !important;
}

/* No Results */
body .tv2-search-results .tv2-no-results {
    text-align: center !important;
    padding: 60px 20px !important;
    background: #fff !important;
    border-radius: 8px !important;
}

body .tv2-search-results .tv2-no-results svg {
    color: #ccc !important;
    margin-bottom: 20px !important;
}

body .tv2-search-results .tv2-no-results__title {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin: 0 0 12px !important;
}

body .tv2-search-results .tv2-no-results__text {
    font-size: 14px !important;
    color: #666 !important;
    margin: 0 0 8px !important;
}

/* ==========================================================================
   Responsive - CRITICAL
   ========================================================================== */

@media (max-width: 1400px) {
    body .tv2-search-results .tv2-results-grid--products {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

@media (max-width: 1200px) {
    body .tv2-search-results .tv2-results-grid--products {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    body .tv2-search-results .tv2-results-grid--pages {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

@media (max-width: 992px) {
    body .tv2-search-results .tv2-search-results__layout {
        flex-direction: column !important;
        flex-wrap: wrap !important;
    }

    body .tv2-search-results .tv2-search-results__sidebar {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        position: static !important;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 16px !important;
        flex: 0 0 auto !important;
    }

    /* CRITICAL: Main content muss 100% breit sein auf Tablet/Mobile */
    body .tv2-search-results .tv2-search-results__main {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
    }

    body .tv2-search-results .tv2-filter-section {
        margin-bottom: 0 !important;
    }

    body .tv2-search-results .tv2-results-grid--pages {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    body .tv2-search-results .tv2-page-card {
        max-width: 100% !important;
        height: 200px !important;
    }

    body .tv2-search-results .tv2-results-grid--products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    body .tv2-search-results .tv2-search-results__sidebar {
        grid-template-columns: 1fr !important;
        display: none !important;
    }

    /* Filter Toggle Button sichtbar auf Mobile */
    body .tv2-search-results .tv2-filter-toggle {
        display: flex !important;
    }

    body .tv2-search-results .tv2-search-results__main {
        width: 100% !important;
        max-width: 100% !important;
    }

    body .tv2-search-results .tv2-results-grid--pages {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    body .tv2-search-results .tv2-page-card {
        height: 160px !important;
    }

    body .tv2-search-results .tv2-results-grid--products {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    body .tv2-search-results .tv2-search-results__title {
        font-size: 20px !important;
    }

    body .tv2-search-results .tv2-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

@media (max-width: 480px) {
    body .tv2-search-results .tv2-results-grid--pages {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    body .tv2-search-results .tv2-results-grid--products {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    body .tv2-search-results .tv2-page-card {
        height: 140px !important;
    }

    body .tv2-search-results .tv2-product-card__title {
        font-size: 13px !important;
    }

    body .tv2-search-results .tv2-results-section {
        padding: 12px !important;
    }
}

/* ==========================================================================
   Header Protection - Prevent BT Search from breaking WoodMart header
   ========================================================================== */

/* Header rows must be full-width for backgrounds/shadows */
body.search .whb-main-header,
body.search-results .whb-main-header {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Only target the visible general header row - NOT hidden rows like top-bar */
body.search .whb-main-header .whb-general-header,
body.search-results .whb-main-header .whb-general-header {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: revert !important;
}

/* Keep hidden rows hidden */
body.search .whb-main-header .whb-not-sticky-row,
body.search-results .whb-main-header .whb-not-sticky-row {
    /* Don't override display - let WoodMart's whb-hidden-* classes work */
}

/* Header containers must use WoodMart default max-width */
body.search .whb-main-header .container,
body.search-results .whb-main-header .container {
    max-width: 1222px !important;
    width: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Header flex rows need flex display for columns */
body.search .whb-main-header .whb-flex-row,
body.search-results .whb-main-header .whb-flex-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Hide bottom search bar on search pages - NUR auf Desktop (prevents duplicate search field) */
/* Auf Mobile braucht WoodMart den Header-Bottom fürs Suchfeld */
@media (min-width: 1025px) {
    body.search .whb-header-bottom,
    body.search-results .whb-header-bottom {
        display: none !important;
    }
}

/* Mobile: Spacing für Header auf Suchseiten bereinigen (kein weißer Bereich) */
@media (max-width: 1024px) {
    body.search .whb-main-header,
    body.search-results .whb-main-header {
        padding: 0 !important;
        margin: 0 !important;
    }
    body.search .whb-header-bottom,
    body.search-results .whb-header-bottom {
        padding: 5px 0 !important;
        margin: 0 !important;
    }
}

/* ==========================================================================
   Footer Protection - Prevent BT Search from breaking footer
   ========================================================================== */

/* Reset all footer containers to WoodMart defaults */
body.search .site-footer,
body.search-results .site-footer,
body.search footer.footer,
body.search-results footer.footer,
body.search .footer-container,
body.search-results .footer-container,
body.search .woodmart-footer,
body.search-results .woodmart-footer,
body.search .wd-footer,
body.search-results .wd-footer {
    max-width: none !important;
    width: auto !important;
    display: block !important;
    padding: revert !important;
    margin: revert !important;
    flex-wrap: revert !important;
}

body.search footer .container,
body.search-results footer .container,
body.search .footer-container .container,
body.search-results .footer-container .container {
    max-width: 1222px !important;
    width: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    display: block !important;
}

body.search footer .row,
body.search-results footer .row,
body.search .footer-container .row,
body.search-results .footer-container .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -15px !important;
    margin-right: -15px !important;
    max-width: none !important;
    width: auto !important;
}

/* WoodMart Header Builder footer rows */
body.search .whb-footer,
body.search-results .whb-footer,
body.search .whb-footer-row,
body.search-results .whb-footer-row {
    max-width: none !important;
    width: 100% !important;
    display: block !important;
    padding: revert !important;
    margin: revert !important;
}

/* Footer columns */
body.search footer .col,
body.search-results footer .col,
body.search footer [class*="col-"],
body.search-results footer [class*="col-"] {
    padding-left: 15px !important;
    padding-right: 15px !important;
    flex: 0 0 auto !important;
}

/* Footer widgets */
body.search footer .widget,
body.search-results footer .widget,
body.search .footer-widget,
body.search-results .footer-widget {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    padding: revert !important;
    margin: revert !important;
}

/* ==========================================================================
   2-Column Dropdown Layout (Desktop Only)
   Pages left, Products right
   ========================================================================== */

@media (min-width: 768px) {
    /* Dropdown results container: 2-column grid on desktop */
    .tv2-search .tv2-search__results {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: 1fr auto auto !important;
        gap: 0 !important;
    }

    /* Pages section - left column, row 1 */
    .tv2-search .tv2-search__section--page {
        grid-column: 1 !important;
        grid-row: 1 !important;
        border-right: 1px solid var(--tv2-border) !important;
        border-bottom: none !important;
    }

    /* Products section - right column, row 1 */
    .tv2-search .tv2-search__section--product {
        grid-column: 2 !important;
        grid-row: 1 !important;
        border-bottom: none !important;
    }

    /* Show more pages - left column, row 2 */
    .tv2-search .tv2-search__show-more--pages {
        grid-column: 1 !important;
        grid-row: 2 !important;
        border-right: 1px solid var(--tv2-border) !important;
    }

    /* Show more products - right column, row 2 */
    .tv2-search .tv2-search__show-more--products {
        grid-column: 2 !important;
        grid-row: 2 !important;
    }

    /* Show All button spans full width, row 3 */
    .tv2-search .tv2-search__show-all {
        grid-column: 1 / -1 !important;
        grid-row: 3 !important;
    }

    /* Dropdown wider on desktop for 2 columns */
    .tv2-search .tv2-search__dropdown {
        min-width: 750px !important;
        max-height: 600px !important;
    }

    /* Equal height for both section columns */
    .tv2-search .tv2-search__section {
        min-height: 200px !important;
    }
}

/* Mobile: Single column (already default behavior) */
@media (max-width: 767px) {
    .tv2-search .tv2-search__results {
        display: block !important;
    }

    .tv2-search .tv2-search__section {
        border-right: none !important;
    }

    .tv2-search .tv2-search__show-more {
        border-right: none !important;
    }
}

/* Mobile: Reset dropdown width to fit screen */
@media (max-width: 767px) {
    .tv2-search .tv2-search__dropdown {
        min-width: auto !important;
        max-width: 100vw !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }
}

/* Grade Badge */
.tv2-grade { display:inline-flex; align-items:center; font-size:12px; font-weight:600; margin-left:8px; }
.tv2-grade__number { display:inline-flex; align-items:center; justify-content:center; min-width:26px; height:18px; padding:0 4px; border-radius:3px; color:#fff; font-weight:700; margin-right:4px; font-size:11px; }
.tv2-grade--sehr-gut .tv2-grade__number { background:#1e8e3e; }
.tv2-grade--sehr-gut { color:#1e8e3e; }
.tv2-grade--gut .tv2-grade__number { background:#34a853; }
.tv2-grade--gut { color:#34a853; }
.tv2-grade--befriedigend .tv2-grade__number { background:#f9ab00; }
.tv2-grade--befriedigend { color:#f9ab00; }
.tv2-grade--ausreichend .tv2-grade__number { background:#e37400; }
.tv2-grade--ausreichend { color:#e37400; }
.tv2-grade--mangelhaft .tv2-grade__number { background:#d93025; }
.tv2-grade--mangelhaft { color:#d93025; }

/* Popular Searches (Prefetch on Focus) */
.tv2-search .tv2-search__section--popular { padding: 8px 0 !important; }
.tv2-search .tv2-search__section-list--popular { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.tv2-search .tv2-search__result-item--popular { padding: 0 !important; }
.tv2-search .tv2-search__popular-link { display: flex !important; align-items: center !important; gap: 8px !important; padding: 8px 16px !important; text-decoration: none !important; color: #333 !important; transition: background 0.15s !important; cursor: pointer !important; }
.tv2-search .tv2-search__popular-link:hover { background: #f0f0f0 !important; }
.tv2-search .tv2-search__popular-icon { font-size: 14px !important; opacity: 0.5 !important; }
.tv2-search .tv2-search__popular-text { font-size: 14px !important; }

/* Highlight matched text */
.tv2-search mark { background: #fff3cd !important; color: inherit !important; padding: 0 1px !important; border-radius: 2px !important; }
