/* ðŸ”¹ General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f9f9f9;
    color: #333;
}

/* ðŸ”¹ Wrapper */
.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* âœ… Tabs Navigation */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.tabs a {
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    padding: 10px 15px;
    border-radius: 5px;
    background: #f1f1f1;
    transition: all 0.3s ease-in-out;
}

.tabs a.active {
    background: #4285f4;
    color: white;
}

.tabs a:hover {
    background: #357ae8;
    color: white;
}

/* âœ… Grid Layout for Results */
.row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* ðŸ“Œ Site Result Box (Same Size for All) */
.site-result {
    flex: 0 0 calc(33.333% - 10px); /* 3 columns on desktop */
    max-width: calc(33.333% - 10px);
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 250px; /* Ensures all results have the same height */
    overflow: hidden;
}

.site-result:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    border-color: #4285f4;
}

/* âœ… Responsive for Tablets */
@media (max-width: 1023px) {
    .site-result {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}

/* âœ… Responsive for Mobile */
@media (max-width: 599px) {
    .site-result {
        flex: 0 0 100%;
        max-width: 100%;
        height: auto; /* Allow height to adjust on mobile */
    }
}

/* ðŸ”¹ Image & Title Styling */
.site-result .site-image {
    width: 100%;
    height: 120px; /* Consistent image height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.site-result .site-image img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 5px;
    object-fit: cover;
}

/* ðŸ”¹ Title */
.site-result .site-title {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    color: #202124;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-result .site-title a {
    text-decoration: none;
    color: #202124;
}

.site-result .site-title a:hover {
    color: #4285f4;
}

/* ðŸ”¹ Description */
.site-result .site-description {
    font-size: 12px;
    color: #666;
    text-align: center;
    max-height: 60px; /* Prevents long descriptions from expanding */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* âœ… Button */
.site-result .site-actions {
    width: 100%;
    text-align: center;
    margin-top: auto;
}

.site-result .site-actions .icon-btn {
    display: inline-block;
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #4285f4;
    color: white;
    text-decoration: none;
    transition: background 0.3s, transform 0.3s;
}

.site-result .site-actions .icon-btn:hover {
    background: #357ae8;
    transform: scale(1.05);
}


/* ðŸ”¹ Responsive: Adjust on Mobile */
@media (max-width: 599px) {
    .pagination .page-link {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* âœ… Ensure Product Content is Responsive */
.product-content {
    width: 100%;
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    text-align: center;
}

/* âœ… Product Title */
.product-title {
    width: 100%;
    font-size: 14px;
    font-weight: bold;
}

.product-title a {
    text-decoration: none;
    color: #202124;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-title a:hover {
    color: #4285f4;
}

/* âœ… Max Description Length */
.product-description {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
    width: 100%;
    text-align: center;
    
    /* âœ… Limit max height to prevent overflow */
    max-height: 80px; /* Adjust as needed */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* Allows text wrapping */
    
    display: -webkit-box;
    -webkit-line-clamp: 7; /* Limits to 4 lines */
    -webkit-box-orient: vertical;
}

/* âœ… Ensure Text-Only Category Looks Correct */
.product-content.text-only .product-description {
    display: block; /* Ensures text-only results are readable */
}

/* ðŸ”¹ Price Styling */
.product-price {
    font-size: 14px;
    font-weight: bold;
    color: #4285f4; /* Google-style blue */
    margin-top: 5px;
}
/* Product Grid Styling */
.th-product {
    border: 2px solid #ddd; /* Increased border thickness */
    border-radius: 5px;
    background-color: #fff;
    overflow: hidden;
    text-align: center;
    padding: 15px;
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s; /* Added border-color transition */
}

.th-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border-color: #4285f4; /* Change border color on hover */
}

.th-product .product-img img,
.th-product .product-img video {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}


