/**
 * SHG Product Filter - Frontend Styles
 * Matching temp.jpg design
 */

/* Main Container */
.shg-product-filter-wrap {
    display: flex;
    gap: 40px;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Filter Sidebar */
.shg-filter-sidebar {
    flex-shrink: 0;
    width: 180px;
    min-width: 150px;
}

.shg-filter-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    padding: 0;
}

.shg-filter-list {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.shg-filter-list li {
    list-style: none !important;
    margin: 0 0 8px 0;
    padding: 0;
}

.shg-filter-list li::before {
    display: none !important;
    content: none !important;
}

.shg-filter-list li::marker {
    display: none !important;
    content: none !important;
}

.shg-filter-link {
    display: block;
    padding: 10px 15px;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0;
}

.shg-filter-link:hover {
    color: #333;
    text-decoration: none;
}

/* Active filter - tan/beige background like in temp.jpg */
.shg-filter-link.is-active {
    background-color: #d4c4a8;
    color: #333;
}

/* Products Grid Container */
.shg-products-grid-wrap {
    flex: 1;
    position: relative;
    min-height: 200px;
}

/* Loader */
.shg-products-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shg-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #d4c4a8;
    border-radius: 50%;
    animation: shg-spin 0.8s linear infinite;
}

@keyframes shg-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Products Grid */
.shg-products-grid {
    display: grid;
    gap: 25px;
    transition: opacity 0.3s ease;
}

.shg-products-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.shg-products-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.shg-products-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* Product Item - Card with border around entire item */
.shg-product-item {
    display: flex;
    flex-direction: column;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.shg-product-item:hover {
    border-color: #ccc;
}

.shg-product-link {
    display: block;
    text-decoration: none;
}

.shg-product-image-wrap {
    background: #fff;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.shg-product-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Product Info - inside the same card */
.shg-product-info {
    padding: 12px 15px 15px 15px;
    background: #f8f8f8;
}

.shg-product-title-link {
    text-decoration: none;
}

.shg-product-title {
    font-size: 15px;
    font-weight: 400;
    color: #333;
    margin: 0 0 5px 0;
    padding: 0;
    line-height: 1.3;
}

.shg-product-title-link:hover .shg-product-title {
    color: #666;
}

.shg-product-price {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.shg-product-price .woocommerce-Price-amount {
    color: #333;
}

.shg-product-price del {
    color: #999;
    font-weight: 400;
    margin-right: 5px;
}

.shg-product-price ins {
    text-decoration: none;
}

/* No products message */
.shg-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Pagination */
.shg-pagination-wrap {
    margin-top: 30px;
    padding: 10px 0;
}

.shg-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.shg-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.shg-page-link:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
    color: #333;
    text-decoration: none;
}

.shg-page-link.is-active {
    background-color: #d4c4a8;
    border-color: #d4c4a8;
    color: #333;
}

.shg-page-link.is-active:hover {
    background-color: #c4b498;
    border-color: #c4b498;
}

.shg-page-prev,
.shg-page-next {
    padding: 0 10px;
}

.shg-page-prev svg,
.shg-page-next svg {
    display: block;
}

.shg-page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 40px;
    color: #999;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 992px) {
    .shg-products-grid[data-columns="4"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .shg-product-filter-wrap {
        flex-direction: column;
        gap: 25px;
    }

    .shg-filter-sidebar {
        width: 100%;
    }

    .shg-filter-list {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .shg-filter-list li {
        margin: 0;
        width: 100%;
    }

    .shg-filter-link {
        display: block;
        width: 100%;
        padding: 12px 15px;
        font-size: 14px;
        text-align: left;
        border-bottom: 1px solid #e0e0e0;
    }

    .shg-filter-list li:last-child .shg-filter-link {
        border-bottom: none;
    }

    .shg-products-grid[data-columns="3"],
    .shg-products-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }

    .shg-products-grid {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .shg-products-grid[data-columns="2"],
    .shg-products-grid[data-columns="3"],
    .shg-products-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }

    .shg-products-grid {
        gap: 12px;
    }

    .shg-product-title {
        font-size: 13px;
    }

    .shg-product-price {
        font-size: 14px;
    }
}
