.stempathy-shop-filters {
    background: #fff;
    padding: 20px 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
}

.stempathy-filter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 90px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: #212520;
    letter-spacing: 0.5px;
}

.stempathy-dropdown {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #212520;
}

/* Search input */
.stempathy-search-input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #212520;
}

.stempathy-search-input::placeholder {
    color: #999;
}

.filter-search {
    flex: 1.3;
}

.filter-buttons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    flex: 0 0 auto;
}

.stempathy-shop-filters button.filter-button,
.stempathy-shop-filters .filter-button {
    background: #F9B428;
    color: #212520;
    border: none;
    padding: 0 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    height: 44px;
    white-space: nowrap;
    line-height: 44px;
}

.stempathy-shop-filters button.filter-button:hover,
.stempathy-shop-filters .filter-button:hover {
    background: #e0a324;
    color: #212520;
}

.clear-filters {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.clear-filters:hover {
    color: #4C9F38;
}

.filter-sort {
    flex: 1;
}

.filter-results-row {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.filter-results-row .woocommerce-result-count {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 40px;
}

.woocommerce ul.products li.product {
    width: auto;
    margin: 0;
    float: none;
}

/* Make product tiles equal-height and push price down */
.woocommerce ul.products li.product {
  display: flex;
  flex-direction: column;
}

/* Push price (and the Add to cart block that comes after it) to the bottom */
.woocommerce ul.products li.product .price {
  margin-top: auto;
}

/* Remove theme/woo default spacing so it can't vary */
.woocommerce ul.products li.product .price {
  margin-bottom: 0;
}

/* Set ONE consistent gap between price and button */
.woocommerce ul.products li.product .ct-woo-card-actions {
  margin-top: 12px;
}



@media screen and (max-width: 1200px) {
    .filter-row {
        flex-wrap: wrap;
    }
    
    .filter-group {
        flex: 0 0 calc(33.333% - 14px);
    }
    
    .filter-buttons {
        flex: 0 0 auto;
    }
    
    .filter-sort {
        flex: 0 0 calc(33.333% - 14px);
    }
    
    .woocommerce ul.products {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
        flex: none;
    }
    
    .stempathy-dropdown {
        width: 100%;
    }
    
    .filter-buttons {
        width: 100%;
    }
    
    .filter-button {
        flex: 1;
    }
    
    .filter-sort {
        width: 100%;
        flex: none;
    }
    
    .woocommerce ul.products {
        grid-template-columns: 1fr;
        gap: 14px;
        padding-left: 12px;
        padding-right: 12px;
    }
 
}

/* Reduce Blocksy shop page top spacing */
.woocommerce-shop .site-main,
.woocommerce-page .site-main {
    padding-top: 20px;
}

.woocommerce-shop .woocommerce-products-header,
.woocommerce-page .woocommerce-products-header {
    margin-bottom: 20px;
}

/* Purchased Badge - Shop Page */
.stempathy-purchased-badge {
    display: inline-block;
    background: #4C9F38;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.woocommerce ul.products li.product {
    position: relative;
}

/* View Content Button */
.stempathy-view-content-btn {
    background: #4C9F38;
    color: #fff;
}

.stempathy-view-content-btn:hover {
    background: #3d8a2c;
    color: #fff;
}

/* Purchased Notice - Single Product Page */
.stempathy-purchased-notice {
    background: #f0f9ed;
    border: 1px solid #4C9F38;
    border-radius: 50px;
    padding: 15px;
    margin-bottom: 20px;
}

.stempathy-purchased-notice .stempathy-purchased-badge {
    position: static;
    margin-bottom: 8px;
}

.stempathy-purchased-notice p {
    margin: 8px 0 0 0;
    font-size: 14px;
    color: #212520;
}

.stempathy-purchased-notice a {
    color: #4C9F38;
    font-weight: 600;
}
/* Search input - match dropdowns exactly */
.stempathy-shop-filters .stempathy-search-input,
.stempathy-shop-filters input.stempathy-search-input,
.stempathy-shop-filters input[type="text"].stempathy-search-input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #212520;
    box-sizing: border-box;
    line-height: 44px;
}

.stempathy-shop-filters .stempathy-search-input::placeholder {
    color: #999;
}

/* Autocomplete dropdown */
.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-autocomplete.active {
    display: block;
}

.search-autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.search-autocomplete-item:last-child {
    border-bottom: none;
}

.search-autocomplete-item:hover {
    background: #f5f5f5;
}

.search-autocomplete-item .product-type {
    font-size: 11px;
    color: #666;
    margin-left: 8px;
}

.filter-search {
    flex: 1.3;
    position: relative;
}

/* Thank you page */
.stempathy-thankyou-action {
    text-align: center;
    margin: 30px 0;
}

.stempathy-members-hub-btn {
    background: #4C9F38;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

.stempathy-members-hub-btn:hover {
    background: #3d8a2c;
    color: #fff;
}

/* Country dropdown background */
.woocommerce-checkout .select2-container--open .select2-dropdown,
.select2-dropdown,
.select2-results__options {
    background-color: #fafaf7;
}

.select2-container--default .select2-results__option {
    padding: 10px 12px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #4C9F38;
    color: #fff;
}

/* Back button wrapper - match product content width */
.woocommerce .stempathy-back-wrap {
    max-width: 750px;
    margin: 0 auto 20px auto;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Mobile only: stop "Back to all resources" hugging the screen edge */
@media (max-width: 768px) {
  .woocommerce .stempathy-back-wrap {
    padding-left: 16px;
    }
}


/* Back button styling */
.stempathy-back-to-resources {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 2px solid #F9B428;
    border-radius: 9999px;
    background: transparent;
    color: #212520;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
}

.stempathy-back-to-resources:hover {
    background: #F9B428;
    color: #212520;
    text-decoration: none;
}

.stempathy-back-to-resources svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
}

/* Move sale badge to top-left corner */
body.woocommerce ul.products li.product .onsale,
body.woocommerce div.product span.onsale,
body .woocommerce ul.products li.product .onsale {
    top: 2px;
    left: 2px;
    right: auto;
    margin: 0;
}


