/* Product listing & detail page css */
.page-with-filter.page-products {    
    background-color: var(--site-bgcolor-light);
}
.page-with-filter.page-products .page-main {
    max-width: 1440px !important;
}
.page-with-filter.page-products .page-main .column.main {
    width: 100%;
    float: none;
    padding-inline: 0;
}
.page-with-filter.page-products h1 {
    font-size: 30px;
    line-height: 30px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
}
.page-with-filter.page-products .category-image, .page-with-filter.page-products .magepow-categories-heading,
.page-with-filter.page-products .magepow-categories-grid {
    display: none;
}

/* Product card must be relative */
.product-item-info {
    position: relative;
}

/* Checkbox container */
.tps-bulk-checkbox {
    display: none;
    width: 21px;
    height: 21px;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
}

/* Show only when bulk mode is ON */
body.tps-bulk-mode .tps-bulk-checkbox {
    display: block;
}

/* Checkbox style */
.tps-bulk-checkbox .tps-product-select {
    width: 21px;
    height: 21px;
    cursor: pointer;
    accent-color: var(--site-primary-teal-color);
    margin: 0;
    border-radius: 4px;
    border: 1px solid rgba(140, 109, 63, 0.30);
    /*background: var(--site-white-color);*/
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.25) inset !important;
    top: 0;    
}

/* Toggle wrapper */
.tps-bulk-select-mode {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

#tps-bulk-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c2c2c;
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    display: flex;
    gap: 12px;
    align-items: center;
    z-index: 9999;
}

#tps-bulk-bar button {
    background: #eee;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}


/* TPS Top Bar – Custom Dropdown Filter UI */
.toolbar-products,
.toolbar.toolbar-products,
.toolbar-amount,
.toolbar-sorter,
.toolbar .limiter,
.toolbar .pages,
.products-grid + .toolbar-products,
.products-list + .toolbar-products {
    display: none !important;
}

.tps-top-bar, .tps-dropdown-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    flex-wrap: wrap;
    font-family: inherit;
    position: relative;
    z-index: 100;
}

.tps-top-bar {
    background: var(--site-white-color);
    border-bottom: 1px solid #E0D8CC;
    backdrop-filter: blur(4px);
    padding: 8px 13px 8px 13px;
}

/* Bulk Select */
.tps-bulk-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 400;
    line-height: 18px;
    white-space: nowrap;
}
.tps-bulk-toggle input[type="checkbox"] { 
    display: none; 
}
.tps-bulk-toggle .slider {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 18px;
    background: var(--site-gray-color);
    border-radius: 20px;
    transition: background .2s;
}
.tps-bulk-toggle .slider::after {
    content: '';
    position: absolute;
    top: 3px; 
    left: 3px;
    width: 12px; 
    height: 12px;
    background: var(--site-white-color);
    border-radius: 50%;
    transition: transform .2s;
}
.tps-bulk-toggle input:checked + .slider { 
    background: var(--site-button-color); 
}
.tps-bulk-toggle input:checked + .slider::after { 
    transform: translateX(18px); 
}

/* Dropdown wrapper */
.tps-filter-dropdown { 
    position: relative; 
}

/* Trigger button */
.tps-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;    
    border-radius: 6px;    
    font-size: 13.5px;
    font-weight: 500;
    color: var(--site-main-text-color);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s, background .15s;
    min-width: 130px;
    border-radius: 6px;
    border: 1px solid #E0D8CC;
    background: var(--site-bgcolor-light);
}
.tps-dropdown-trigger:hover,
.tps-filter-dropdown.tps-open .tps-dropdown-trigger {
    border-color: #4a9d8f;
    background: #f9f7f5;
}
.tps-trigger-arrow {
    display: inline-block;
    width: 8px; height: 8px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s;
    margin-left: auto;
    flex-shrink: 0;
}
.tps-filter-dropdown.tps-open .tps-trigger-arrow {
    transform: rotate(-135deg) translateY(-2px);
}

/* Panel */
.tps-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 180px;
    background: var(--site-white-color);
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0,0,0,.12);
    padding: 8px 0;
    z-index: 9999;
}
.tps-filter-dropdown.tps-open .tps-dropdown-panel { 
    display: block; 
}

/* Options */
.tps-radio-option,
.tps-checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13.5px;
    color: #3a3a3a;
    transition: background .12s;
    user-select: none;
}
.tps-radio-option:hover,
.tps-checkbox-option:hover { background: #f5f2ef; }
.tps-radio-option input[type="radio"],
.tps-checkbox-option input[type="checkbox"] { display: none; }

/* Radio indicator */
.tps-radio-indicator {
    flex-shrink: 0;
    width: 18px; height: 18px;
    border: 2px solid #c0b8b0;
    border-radius: 50%;
    position: relative;
    transition: border-color .15s;
}
.tps-radio-option input:checked ~ .tps-radio-indicator { border-color: #4a9d8f; }
.tps-radio-option input:checked ~ .tps-radio-indicator::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 10px; 
    height: 10px;
    background: #4a9d8f;
    border-radius: 50%;
}

/* Checkbox indicator */
.tps-checkbox-indicator {
    flex-shrink: 0;
    width: 18px; height: 18px;
    border: 2px solid #c0b8b0;
    border-radius: 4px;
    position: relative;
    transition: border-color .15s, background .15s;
}
.tps-checkbox-option input:checked ~ .tps-checkbox-indicator {
    background: #4a9d8f;
    border-color: #4a9d8f;
}
.tps-checkbox-option input:checked ~ .tps-checkbox-indicator::after {
    content: '';
    position: absolute;
    top: -1px; 
    left: 3px;
    width: 5px; 
    height: 10px;
    border: 2px solid var(--site-white-color);
    border-top: none; 
    border-left: none;
    transform: rotate(45deg);
}
.tps-radio-option.tps-option-selected { 
    font-weight: 600; 
}

/* Search */
.tps-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}
.tps-search-icon {
    position: absolute;
    left: 10px; top: 50%;
    transform: translateY(-50%);
    color: #999;
    display: flex; align-items: center;
}
#tps-search {
    width: 100%;
    padding: 7px 12px 7px 34px;
    font-size: 12px;
    line-height: 18px;
    color: var(--site-main-text-color);
    border-radius: 6px;
    border: 1px solid #E0D8CC;
    background: var(--site-bgcolor-light);
    transition: border-color .15s;
    box-sizing: border-box;
}
.tps-search-wrapper #tps-search::placeholder {
    color: #9CA3AF;
} 
#tps-search:focus { outline: none; border-color: #4a9d8f; }

/* Product count */
.tps-product-count {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    margin-left: auto;
}

/* Applied filters bar */
.tps-applied-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 5px 12px;
    min-height: 40px;
    border-bottom: 1px solid #D4CFC4;
}
.tps-applied-label, .tps-filter-tag, 
.tps-filter-tag .tps-tag-remove, .tps-clear-all { 
    color: var(--site-main-text-color);
    font-family: var(--site-body-font);
    font-size: 15px;    
    font-weight: 600;
    line-height: 18px;    
}
.tps-applied-tags { 
    display: flex; 
    gap: 6px; 
    flex-wrap: wrap; 
}
.tps-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 400;
}
.tps-filter-tag .tps-tag-remove {    
    font-size: 19px;         
    padding: 0 0 0 2px;
    background: none; 
    border: none;
    cursor: pointer; 
}
.tps-clear-all {
    display: inline-flex; 
    align-items: center; 
    gap: 3px;
    font-weight: 400;
    background: none; 
    border: none;    
    cursor: pointer; 
    padding: 0 4px; 
    margin-left: auto;
}
.tps-clear-all svg { 
    width: 18px;
    height: 18px;
    background: url('../images/product-listing-sprite.svg') no-repeat;
    background-position: -259px -15px;
    font-size: 0;
}
.tps-clear-all svg polyline, .tps-clear-all svg path {
    display: none;
}


/* Infinite scroll sentinel */
#tps-scroll-sentinel {
    width: 100%;
    min-height: 1px;
    margin: 8px 0 24px;
    text-align: center;
}
.tps-end-of-results {
    color: #aaa;
    font-size: 13px;
    padding: 16px 0 8px;
    margin: 0;
}
/* Three-dot bounce loader */
.tps-scroll-loading {
    display: inline-flex;
    gap: 6px;
    padding: 20px 0;
    align-items: center;
    justify-content: center;
}
.tps-scroll-loading span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4a9d8f;
    animation: tps-bounce 1.2s infinite ease-in-out;
}
.tps-scroll-loading span:nth-child(2) { animation-delay: 0.2s; }
.tps-scroll-loading span:nth-child(3) { animation-delay: 0.4s; }
@keyframes tps-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%            { transform: scale(1); opacity: 1; }
}

#tps-products-container .products-grid ol.products.product-items {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 16px;
}
#tps-products-container .products-grid li.product-item {
    width: 100%;
    margin-inline: 0;
    position: relative;
    border-radius: 10px;    
    background: var(--site-white-color);
}
#tps-products-container .products-grid li.product-item .product-item-actions .actions-secondary {
    display: none;
}
#tps-products-container .products-grid li.product-item .product-item-info {
    width: 100%;
}
#tps-products-container .products-grid li.product-item .product-image-container {
    background: #ECE6DF;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    width: 100%;
    height: 100%;    
    padding: 12px;
    /*aspect-ratio: 266 / 220;*/
}
#tps-products-container .products-grid li.product-item .product-item-details {
    padding: 12px 12px 10px 12px;
    border-radius: 0 0 10px 10px;
    background: var(--site-white-color);
}
#tps-products-container .products-grid li.product-item .tps-badge {
    background: #8C6D3F;
    color: #F5F0E8;
    font-family: var(--site-body-font);
    font-size: 10px;    
    font-weight: 500;
    line-height: 15px;
    letter-spacing: 0.25px;
    padding: 2px 4px 2px 4px;
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 2;
}
#tps-products-container .products-grid li.product-item .tps-badge.best {
    background: #8C6D3F;    
}
#tps-products-container .products-grid li.product-item .tps-badge.new {
    background: var(--site-main-text-color);    
}
#tps-products-container .products-grid li.product-item .tps-product-sku {
    display: block;
    margin: 0;
    color: var(--site-subtext-color);
    font-family: var(--site-body-font);
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    letter-spacing: 0.3px;
}
#tps-products-container .products-grid li.product-item .product-item-name {
    margin: 12px 0;
}
#tps-products-container .products-grid li.product-item .product-item-name a {
    display: block;
    font-size: 14px;
    font-weight: 500;
    line-height: 17.5px;
    color: var(--site-main-text-color);
    margin-bottom: 0;
}
#tps-products-container .products-grid li.product-item .price-box {
    margin: 12px 0;
}
#tps-products-container .products-grid li.product-item .price-box .price {
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    color: var(--site-main-text-color);
    margin-bottom: 0;
}
#tps-products-container .products-grid li.product-item .actions-primary {    
    width: 100%;
    margin-inline: auto;
    text-align: center;
}
#tps-products-container .products-grid li.product-item .tocart {
    white-space: nowrap;
    font-family: var(--site-body-font);
    font-size: 14px;
    line-height: 16px !important;
    font-weight: 500;
    background: var(--site-button-color);
    color: var(--site-white-color);
    border-radius: 8px;
    min-width: 195px;
    padding: 5px !important;
    border: 1px solid var(--site-button-color);
    height: 32px !important;
    width: 100%;
    max-width: 246px;
}
#tps-products-container .products-grid li.product-item .product-categories {
    display: flex;
    gap: 6px;
    align-items: center;
}
#tps-products-container .products-grid li.product-item .product-categories span {
    padding: 3px 6px;
    border: 1px solid #D4CFC4;
    color: #7A7468;
    font-family: var(--site-body-font);
    font-size: 11px;    
    font-weight: 400;
    line-height: 16.5px;
}
#tps-products-container .products-grid li.product-item .tps-product-sku-stock-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#tps-products-container .products-grid li.product-item .tps-product-sku-stock-block .tps-stock-status {    
    font-family: var(--site-body-font);
    font-size: 10px;
    font-weight: 500;
    line-height: 15px;
    background: rgba(74, 124, 89, 0.08);
    padding: 2px 6px;
}
#tps-products-container .products-grid li.product-item .tps-product-sku-stock-block .tps-stock-status.in {
    background: rgba(74, 124, 89, 0.08);
    color: #4A7C59;
}
#tps-products-container .products-grid li.product-item .tps-product-sku-stock-block .tps-stock-status.low {
    background: rgba(140, 109, 63, 0.08);
    color: #8C6D3F;
}


/*media queries start*/ 

@media (hover:hover) {
#tps-products-container .products-grid li.product-item .tocart:hover {
    background: var(--site-dark-teal-color) !important;
    border: 1px solid var(--site-dark-teal-color) !important;
}
.tps-filter-tag .tps-tag-remove:hover { 
    color: var(--site-primary-teal-color); 
}
.tps-clear-all:hover { 
    text-decoration: underline; 
    background: transparent;
    border: none;
}
}

@media(max-width:767px) {
#tps-products-container .products-grid ol.products.product-items {    
    grid-template-columns: 1fr 1fr;    
}    
#tps-products-container .products-grid li.product-item .tocart {
    max-width: 100%;
}
.tps-icon-section.tps-user-login-section {
    position: relative;
    display: block;
}
.tps-top-bar {
    background: var(--site-bgcolor-light);
    border-bottom: 1px solid #E0D8CC;
    backdrop-filter: blur(4px);
    padding: 8px 0 8px 0;
}
.tps-search-wrapper {   
    order: 1;
}
.tps-filter-button-mobile.tps-mobile {
    order: 2;
}
#tps-sort-dropdown {
    order: 3;
}
.tps-bulk-select-mode {
    border: 1px solid #E0D8CC;
    border-radius: 6px;
    min-height: 32px;
    padding: 6px;
    order: 4;
}
.tps-product-count {    
    order: 5;
    display: none;
}
.tps-filter-button-mobile #tps-filter-button {
    border: 1px solid #E0D8CC;
    border-radius: 6px;
    background: var(--site-bgcolor-light);
    font-size: 14px;
    font-weight: 400;
}
.tps-bulk-toggle, .tps-dropdown-trigger ,tps-trigger-label {
    font-size: 14px;
}
.tps-icon-section.tps-user-mini-cart-section .tps-content-title {
    display: none;
}
.tps-user-login-span {
    font-size: 0;
}
}

@media(max-width:580px) {
#tps-products-container .products-grid ol.products.product-items {    
    grid-template-columns: 1fr;    
} 
}

/*media queries end*/