/* Products CSS */

/* General styles */
:root {
    --primary-color: #28B294;
    --secondary-color: #26A69A;
    --accent-color: #4ECDC4;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --medium-gray: #dee2e6;
    --dark-gray: #6c757d;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-color: #ced4da;
}

body {
    color: var(--text-color);
    background-color: #f9f9f9;
}

.homeanchor:hover, .productanchor:hover{
    text-decoration: underline;
}

/* Products container and grid */
.product-listing {
    padding: 40px 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--white);
    height: 100%;
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-link {
    text-decoration: none;
    color: inherit;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-image-container {
    text-align: center;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 248px;
    position: relative;
}

.product-card-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #007bff;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
}

.product-card-icon i {
    /* No specific styles needed for the icon itself beyond parent */
}

.product-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.product-image.loading {
    opacity: 0.5;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto;
}

.product-category {
    font-size: 14px;
    color: var(--dark-gray);
    text-transform: none;
    margin-bottom: 0;
}

/* Remove styles for elements not present in the target format */
.product-rating,
.product-footer,
.product-price,
.view-details {
    display: none;
}

/* Search section styles - Keep existing */
.search-section {
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.search-spinner {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
}

.search-spinner.active {
    display: block;
}

/* Loading messages - Keep existing */
.no-products-message, .loading-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 18px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments - Review and adjust if needed */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }

    .search-section {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        min-width: auto;
    }

    .product-image-container {
        min-height: 200px;
    }
}

@media (max-width: 768px) {
    .product-listing {
        padding: 20px 0;
    }

    .product-grid {
        gap: 15px;
    }

    .product-image-container {
        min-height: 180px;
    }

    .product-info {
        padding: 10px;
    }

    .product-title {
        font-size: 14px;
    }

    .product-category {
        font-size: 12px;
    }
}

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

    .product-image-container {
        min-height: 150px;
    }

    .product-info {
        padding: 10px;
    }

    .product-title {
        font-size: 16px;
    }

    .product-category {
        font-size: 14px;
    }
}
