@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

/* Remove conflicting styles and keep only the Vue component styles */
/* Vue Search Results Component Styles */

/* Search Term Display */
.search-term-display {
    font-size: 16px;
    padding: 10px 0 20px 0;
    font-family: "Poppins";
}

.search-term-display b{
    font-weight: 600;
}

.search-term-display div:first-child {
    color: black;
    font-size: 16xxpx;
    margin-bottom: 5px;
}

.search-term-display div:last-child {
    color: black;
    font-size: 16px;
}

.total-results {
    color: #666;
    font-size: 14px;
}

/* Tabs Navigation */
.search-tabs {
    display: flex;
    padding-bottom: 0px;
    gap: 10px;
    padding-top:20px;
    background: #fff;
    position: sticky;
    top:120px;

}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;   
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
    font-family: "Roboto";
}

.tab:hover {
    background: #e9ecef;
}

.tab.active {
    background: white;
    color: #08829A;
    position: relative;
}

.tab.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height:2px;
    background: #08829A;
    border-radius: 4px;
}

.tab-icon {
    font-size: 16px;
}

.tab-label {
    font-weight: 500;
    white-space:normal;
    word-wrap: keep-all;
    line-height:1.2;
    margin-top:3px;
    margin-bottom:3px;
}

.tab-count {
    color: #666;
    font-size: 12px;
}

/* Tab Content */
.tab-content {
    min-height: 400px;
}

/* Products Grid */

.all-tab h3, .products-tab h3, .reviews-tab h3, .blog-tab h3, .generic-content-tab h3 {
    margin: 0 0 30px 0;
    color: #08829A;
    font-size: 20px;
    font-weight: 500;
    font-family: "Poppins";
}

.all-tab h3, .products-tab h3 {
    margin-bottom: 10px;
}

.product-count {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    font-family: "Roboto";
    text-align: left;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-card,
.product-card-scroll {
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    background: linear-gradient(180deg, rgba(225, 243, 246, 1) 0%, rgba(255, 255, 255, 1) 100%);
    display: flex;
    box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.product-card-scroll {
    flex: 0 0 280px;
    transition: box-shadow 0.3s ease;
}

.product-title {
    text-decoration: none;
    font-size: 19px;
    font-weight: bold;
    color: #08829A;
    font-family: "Roboto";
}

.product-meta {
    font-size: 16px;
    color: black;
    font-family: "Roboto";
    font-weight: bold;
    margin-bottom: 10px;
}

.single-prod-summary {
    font-size: 16px;
    color: black;
    font-family: "Roboto";
    font-weight: normal;
    margin-bottom: 10px;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-image-container {
    text-align: center;
    padding: 15px;
    padding-bottom:10px;
    padding-top:25px;
}

.product-image {
    max-width: 100%;
    height: auto;
    max-height: 230px;
}

.product-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow:1;
    padding-bottom:25px;
}


.product-name {
    color: #08829A;
    text-decoration: none;
    font-weight: bold;
    display: block;
}

.product-name:hover {
    text-decoration: underline;
}

.product-summary-link {
    text-decoration: none;
    color: inherit;
}

.price {
    font-size: 18px;
    font-weight: bold;
    color: black;
    margin: 0px 0;
    font-family: "Roboto";
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    justify-content: center;
}

.product-price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    justify-content: center;
}

.product-rating {
    display: flex;
    gap: 7px;
    justify-content: center;
    font-family: "Roboto";
    font-size: 12px;
}


.out-of-stock-message {
    color: grey;
    font-size: 14px;
    font-weight: bold;
    font-family: "Roboto";
    text-align: center;
    padding: 5px 15px;
    background: #f0f0f0;
    width:fit-content;
    border-radius: 4px;
}

.out-of-stock-message p {
    margin: 0;
}

.quantity-buttons {
    display: flex;
    align-items: center;
}

.minus-btn, .plus-btn {
    background: #F36B1D;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #F36B1D;
}

.minus-btn {
    border-radius: 4px 0 0 4px;
}

.plus-btn {
    border-radius: 0 4px 4px 0;
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    border-radius: 0;
    padding: 5px;
    font-family: "Roboto";
}

.add-to-cart-btn {
    background: #F36B1D;
    color: white;
    border: none;
    padding: 5px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    width: 100%;
    font-family: "Roboto";
    font-size: 14px;
}

.add-to-cart-btn:hover {
    background: #F36B1D;
}

/* Content and Reviews Lists */
.content-list, .reviews-list {
    margin-bottom: 30px;
}


.content-item, .review-item {
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
    box-sizing: border-box;

}

.content-item:hover, .review-item:hover {
    background: #f9f9f9;
}

.result-container {
    display: flex;
    gap: 15px;
}

.result-image-container {
    flex-shrink: 0;
    width: 80px;
}

.result-image {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
}

.result-container.blog:hover{
    background: #f9f9f9;
}

.result-container.blog .search-result-date{
    font-size:14px;
    text-align: right;
}

.result-container.blog .result-image-container {
    width: 160px;
    height: 160px;
    object-fit: cover;
    max-width: 160px;
    max-height: 160px;
}

.result-container.all.blog .result-image-container{
    width: 80px;
    height: 80px;
    max-width: 80px;
    max-height: 80px;
}

.result-container.all.blog img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-image.blog-image{
    width: 160px;
    height: 160px;
    object-fit: cover;
    max-width: 160px;
    max-height: 160px;
}

.result-content {
    flex: 1;
}

.search-result-title {
    color: #08829A;
    font-size:20px;
}

.search-result-title a {
    color: #08829A;
    text-decoration: none;
    font-weight: 500;
}

.search-result-title a:hover {
    text-decoration: underline;
}

.search-result-url {
    color: #08829A;
    margin-bottom: 5px;
}

.result-link {
    color: black;
    font-size: 14px;
    text-decoration: none;
}

.blog-card .result-link-wrapper{
    flex:1;
}

.search-result-text {
    color: black;
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.result-type {
    color: #999;
    font-size: 12px;
    font-style: italic;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.pagination-btn {
    background: #08829A;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
    background: #066d8a;
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    min-width: 40px;
}

.page-btn:hover:not(:disabled) {
    background: #f8f9fa;
}

.page-btn.active {
    background: #08829A;
    color: white;
    border-color: #08829A;
}

.page-btn.ellipsis {
    border: none;
    background: transparent;
    cursor: default;
}

/* No Results */
.no-results-tab, .no-results {
    text-align: center;
    color: #666;
    font-family: "Poppins";
}

/* Loading and Error States */
.search-loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.search-loading-spinner {
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #08829A;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    color: #666;
    font-size: 16px;
}

.search-error {
    text-align: center;
    padding: 40px 20px;
    color: #d32f2f;
}

/* Attributes Dropdown */
.attributes-dropdown {
    appearance: none;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    padding: 0 0 0 0;
    min-width: 55px;
    text-align: center;
    font-size: 18px;
    font-family: "Arial", sans-serif;
    color: #495057;
    transition: all 0.3s ease;
    outline: none;
    cursor: pointer;
}

.attributes-dropdown:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.attributes-dropdown:focus {
    background-color: #fff;
    border-color: #80bdff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.attributes-dropdown:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

/* Wrap the select in a container to allow absolute positioning of the caret */
.attributes-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

/* Add the custom down caret */
.attributes-dropdown-wrapper::after {
    content: "▼";
    font-size: 10px;
    color: #333;
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-45%);
    pointer-events: none;
}

/* Ensure the select element fits inside the wrapper */
.attributes-dropdown-wrapper select {
    width: 100%;
    padding-right: 20px;
    padding-left: 5px;
}

/* Stars Rating */
span.stars,
span.stars span {
    display: inline-block;
    background: url('https://www.activeherb.com/img/stars.png') 0 -12px repeat-x;
    width: 65px;
    height: 12px;
    margin-top: 4px;
}

span.stars span {
    background-position: 0 0 !important;
    overflow: hidden !important;
    float: left !important;
    margin-top: 0px !important;
}

/* Products Scroller */
.products-scroller-section {
    margin-bottom: 30px;
}

.products-scroller {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 10px 0 20px 10px;
    margin-bottom:20px;
    scrollbar-width: thin;
    scrollbar-color: #08829A #f0f0f0;
    padding-bottom: 30px;
}

.products-scroller::-webkit-scrollbar {
    height: 8px;
}

.products-scroller::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.products-scroller::-webkit-scrollbar-thumb {
    background: #08829A;
    border-radius: 4px;
}

.products-scroller::-webkit-scrollbar-thumb:hover {
    background: #066d8a;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.blog-card {
    background: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.result-container.blog {
    display: flex;
    gap: 15px;
    height: 100%;
}

/* Legacy styles for backward compatibility */
.search-results-container-parent {
    min-height: 60vh;
}

body,
.arial {
    font-family: Arial, sans-serif;
}

body {
    overflow-wrap: break-word;
    word-wrap: break-word;
    -ms-word-break: break-all;
    word-break: break-all;
    word-break: break-word;
}

.hide-me {
    display: none;
}

input {
    padding: 4px 5px;
    font-size: 16px;
    width: 100%;
}

.dynamic-search-results {
    padding: 15px 0 10px 5px;
    font-family: Arial, sans-serif;
}

/* Reviews Tab Product Grouping */
.review-product-group {
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
    display: flex;

}

.review-product-header {
    margin-bottom: 10px;
}

.review-product-info {
    display: flex;
    align-items: center;
    gap: 10px;
    
}

.review-product-img {
    max-width: 80px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 20px;
    border-radius: 6px;
    background: #fff;
}

.review-product-title {
    font-weight: normal;
    font-size: 18px;
    vertical-align: middle;
    color: #08829A;
}

.review-product-meta {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

.review-product-mentions {
    margin-top: 5px;
    font-size: 15px;
    color: #333;
}

.review-product-reviews-scroller {
    display: flex;
    overflow-y: auto;
    flex-direction: column;
    max-height: 300px;
    gap: 5px;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #08829A #f0f0f0;
}

.review-product-reviews-scroller::-webkit-scrollbar {
    height: 8px;
}

.review-product-reviews-scroller::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.review-product-reviews-scroller::-webkit-scrollbar-thumb {
    background: #08829A;
    border-radius: 4px;
}

.review-product-reviews-scroller::-webkit-scrollbar-thumb:hover {
    background: #066d8a;
}

.review-content{
    flex-grow:1;
}

.full-review-text .review-text{
    margin-bottom: 10px;
}

.review-title{
    margin-bottom: 10px;
}

.review-excerpt-card {
    min-width: 300px;
    background: #f9f9f9;
    padding: 10px 15px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    border-left: 4px solid #B3B3B3;
    flex-grow:1;
    display: flex;
    justify-content: space-between;
    gap:20px;
}

.review-user-info{
    font-style:italic;
}

.review-excerpt-card button{
    background:none;
    width:25px;
    height:25px;
    min-width:25px;
    min-height:25px;
    border:none;
    outline:none;
    cursor: pointer;
    font-size: 20px;
    color: #08829A;
    font-family: "Roboto";
    border-radius: 4px;
    margin-left: auto;
    border:1px solid transparent;
    transition: all 0.3s ease;
}

.review-excerpt-card button p{
    margin:0;
    text-align: center;
    line-height: 25px;
}

.review-excerpt-card button:hover{
    border: 1px solid #08829A;
}

.review-excerpt-card.expanded {
    border-left: 4px solid #08829A;
    background: #DDE8EE;
    padding: 12px 15px;
}

.review-excerpt-text {
    color: #333;
    font-size: 15px;
    line-height: 1.5;
    /* clamp to 1 line */
}

.review-user-name {
    font-weight: bold;
    color: #08829A;
    font-size: 14px;
    margin-bottom: 5px;
}

@media (max-width: 600px) {
    .review-excerpt-card {
        min-width: 220px;
        max-width: 95vw;
        font-size: 14px;
        gap: 0;
    }

}

/* Responsive Design */
@media (max-width: 768px) {
    .search-tabs {
        gap:0;
        padding-bottom: 10px;
    }

    .product-count{
        text-align: center;
    }

    .result-container.blog{
    }

    .result-container.blog.all{
        flex-direction: row;
    }

    .result-container.blog .result-image-container{
        width:80px;
        height:80px;
        max-width:80px;
        max-height:80px;
    }

    .result-image.blog-image{
        width:80px;
        height:80px;
        max-width:80px;
        max-height:80px;
    }

    .review-product-group {
        flex-direction: column;
    }

    .review-product-image-container{
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin-bottom: 10px;
    }

    .review-product-info{
        justify-content: center;
        
    }

    .review-product-info a{
        text-align: center;
    }

    .review-product-img{
        max-width:100px;
    }

    .review-product-rating,
    .review-product-mention{
        font-size:14px;
    }

    .review-product-info .review-product-title{
    }
    
    .tab {
        justify-content: center;
        font-size:12px;
        padding: 5px;
        white-space: nowrap;
        width:20%;
        max-width:20%;
        padding: 2px 5px;
        text-align: center;
        border: 1px solid #08829A;
        border-right:none;
        color: #08829A;
    }

    .tab:last-child{
        border-right: 1px solid #08829A;
    }
    
    .tab.active{
        background: #08829A;
        color: #fff;
    }

    .tab.active::after{
        background: transparent;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .products-scroller{
        gap:10px;
    }

    .product-card-scrol{
        flex: 0 0 250px;
    }
    

    
    .result-image-container {
        width: 50px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    .all-tab h3, .products-tab h3, .reviews-tab h3, .blog-tab h3, .generic-content-tab h3 {
        text-align: center;
        font-size:22px;
    }
    .search-term-display{
        padding-top:0;
    }
    .content-item, .review-item {
        padding: 12px 0;
    }

    
}

@media (min-width: 1299px) {
    .search-tabs {
        top:80px;
    }
}

@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

