/* Main Container */
.post-type-archive-tire section.page_header_default{
    display: none;
    visibility: hidden;
}

.tire-grid.loading {
  position: relative;
}
.tire-grid.loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2); /* semi-transparent overlay */
  z-index: 10;
}


.tire-grid.loading .loader {
    display: block;
}

.tire-grid .loader {
    display: none;
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: transparent;
    border-radius: 50%;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    position: absolute;
    left: 50%;
    top: 100px;
    transform: translateX(-50%);
    z-index: 100;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
} 


.tire-archive-container {

    display: flex;

    max-width: 1400px;

    margin: 0 auto;

    padding: 80px 0;

    position: relative;

}



/* Mobile Filter Toggle */

.mobile-filter-toggle {

    display: none;

    position: fixed;

    bottom: 20px;

    right: 20px;

    z-index: 100;

    background: #0EB033;

    color: white;

    border: none;

    border-radius: 50px;

    padding: 12px 20px;

    box-shadow: 0 4px 10px rgba(0,0,0,0.2);

    align-items: center;

    gap: 8px;

    font-weight: bold;

}



.mobile-filter-toggle svg {

    width: 20px;

    height: 20px;

}



/* Sidebar Filters */

.tire-filters-sidebar {

    width: 25%;

    background: #f8f8f8;

    border-radius: 8px;

    margin-right: 30px;

    position: sticky;

    top: 20px;

    align-self: flex-start;

}

#tire-filters-form {
    padding: 20px;
}



.filter-header {

    display: flex;

    justify-content: center;

    align-items: center;
    background: #282f3b;


}



.filter-header h3 {

    margin: 0;
    font-size: 18px;
    color:#0EB033;
    line-height: 1;
    padding: 10px 0;

}



.close-sidebar {

    display: none;

    background: none;

    border: none;

    font-size: 24px;

    cursor: pointer;
    position: absolute;
    right: 0;
    color: white;
    line-height: 1;

}



.filter-section {

    margin-bottom: 30px;

}



.filter-section h4 {

    margin-bottom: 10px;

    font-size: 16px;

    color: #333;
    line-height: 1;

}

.filter-section.search {

    display: flex;

    flex-direction: column;
    margin-bottom: 50px;

}
.filter-input-wrapper.search, .filter-input-wrapper.search input[type="text"] {
    margin-bottom: 0;

}

.tire-filters-sidebar input,
.tire-filters-sidebar select {
    height: 42px;
}

.tire-filters-sidebar input[type="text"] {

    padding: 10px;

    border: 1px solid #ddd;

    border-radius: 4px;

    background: white;

}

.tire-filters-sidebar select {

    width: 100%;

    padding: 10px;

    border: 1px solid #ddd;

    border-radius: 4px;

    background: white;

}



.price-range {

    display: flex;

    align-items: center;

    gap: 10px;

}



.price-range input {

    width: calc(50% - 15px);

    padding: 10px;

    border: 1px solid #ddd;

    border-radius: 4px;

}



.price-range span {

    color: #666;

}



.filter-actions {

    display: flex;

    gap: 10px;

    margin-top: 20px;

}



.filter-actions .button {

    flex: 1;

    padding: 12px;

    text-align: center;

}



.filter-actions .reset {

    background: #f0f0f0;

    color: #333;

}



.filter-actions .reset:hover {

    background: #e0e0e0;

}



/* Main Content */

.tire-archive-main {

    width: 75%;

}



.archive-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 30px;

    flex-wrap: wrap;

    gap: 20px;

}



.archive-header h1 {

    margin: 0;

    font-size: 2em;

    flex: 1;

    min-width: 300px;

}



.sort-options select {

    padding: 8px 12px;

    border: 1px solid #ddd;

    border-radius: 4px;

    background: white;

}



/* Tire Grid */

.tire-grid {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 25px;

    margin-bottom: 40px;

}



.tire-card {

    display: flex;

    border: 1px solid #eee;

    border-radius: 8px;

    overflow: hidden;

    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 12px;
}



.tire-card:hover {

    transform: translateY(-5px);

    box-shadow: 0 10px 20px rgba(0,0,0,0.1);

}



.tire-image {
    width: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;

}

.tire-image img {

    width: 100%;

    height: 100%;

    object-fit: contain;

}
.tire-image-season {
    position: absolute;
    bottom: 0;
    right: -8px;
}
.tire-image-season svg {
    width: 26px;
    height: 26px;
}

.tire-image-season svg.snow {
    right: 16px;
}
.tire-details {

    width: calc(100% - 100px);

    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 16px;

}

.tire-brand {
    background-color: #282F3B;
    color: #0EB033;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 14px;
    min-height: 22px;
    
}

.tire-title {
    font-size: 18px;
    cursor: pointer;
    line-height: 1.3;

}
.tire-title a{
    font-size: 18px;
    cursor: pointer;
}
.tire-stars {
    display: flex;
}
.tire-stars svg {
    fill:#0EB033;
    width: 16px;
}


.tire-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.stock-status {
    font-size: 14px;
    margin: 0;
}
.stock-status.in-stock {
    color:#0EB033;
}
.stock-status.out-of-stock {
    color: #d82c2c;
}


.tire-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tire-button {
    background-color: #0EB033;
    color: #fff;
    font-size: 12px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    border: 1px solid #0EB033;
    border-radius: 8px 0px 8px 0px;
    padding: 8px 16px;
}
.tire-button:hover {
    background-color: #fff;
   
    color: #0EB033;
    border-radius: 0px 8px 0px 8px;
}






.no-results {

    grid-column: 1 / -1;

    text-align: center;

    padding: 40px 0;

    color: #666;

}



/* Pagination */

.tire-pagination {

    display: flex;

    justify-content: center;

    margin-top: 40px;

}



.tire-pagination .page-numbers {

    display: inline-block;

    padding: 8px 16px;

    margin: 0 4px;

    border: 1px solid #ddd;

    border-radius: 4px;

    text-decoration: none;

    color: #0EB033;

}
.tire-pagination .page-numbers:hover {
        background: #0EB033;

    color: white;

    border-color: #0EB033;

}


.tire-pagination .page-numbers.current {

    background: #0EB033;

    color: white;

    border-color: #0EB033;

}



.tire-pagination .page-numbers.dots {

    border: none;

}



/* Responsive */

@media (max-width: 1024px) {
    .tire-filters-sidebar {
        width: 40%;
    }

    .tire-grid {
        grid-template-columns: 1fr;

    }   

}



@media (max-width: 768px) {

    .tire-card {
        flex-direction: column;
        gap: 10px;
    }
    .tire-image, .tire-details {
        width: 100%;
    }
    .tire-image img {
        aspect-ratio: 16 / 9;
        max-width: 200px;
        width: 200px;
    }

    .tire-archive-container {
        flex-direction: column;
        padding: 40px 0;    
    }

    

    .tire-filters-sidebar {

        position: fixed;

        top: 0;

        left: -100%;

        width: 80%;

        height: 100%;

        z-index: 100;

        margin: 0;

        border-radius: 0;

        transition: left 0.3s ease;
        overflow: scroll;

    }

    

    .tire-filters-sidebar.active {

        left: 0;

    }

    

    .close-sidebar {

        display: block;

    }

    

    .mobile-filter-toggle {

        display: flex;

    }

    

    .tire-archive-main {

        width: 100%;

    }

    

    .archive-header {

        flex-direction: column;

        align-items: flex-start;

        gap: 15px;

    }

}

.filter-input-wrapper:not(.search)::after{
  content:"";
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;
}







.filter-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.filter-input-wrapper input[type="text"],
.filter-input-wrapper input[type="search"],
.filter-input-wrapper input[type="number"],
.filter-input-wrapper select {
  width: 100%;
  padding-right: 26px; /* space for the × */
}

.filter-input-wrapper .clear-input {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  display: none;        /* hidden until field has value */
  line-height: 1;
}

.filter-input-wrapper .clear-input:hover {
  color: #333;
}
