.tm-shop-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    /* Full width */
    margin: 0 auto;
    padding: 20px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* Fallback, assuming theme handles fonts */
}

/* Sidebar */
.tm-shop-sidebar {
    flex: 0 0 250px;
    border-right: 1px solid #eee;
    padding-right: 20px;
}

.tm-filter-group {
    margin-bottom: 30px;
}

.tm-filter-title {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #000;
    padding-bottom: 5px;
    display: inline-block;
}

.tm-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tm-filter-list li {
    margin-bottom: 8px;
}

.tm-filter-list label {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
    transition: color 0.3s;
}

.tm-filter-list label:hover {
    color: #000;
}

.tm-filter-checkbox {
    margin-right: 10px;
    accent-color: #000;
    /* Modern browser support */
}

/* Main Content */
.tm-shop-main {
    flex: 1;
}

.tm-shop-header {
    display: flex;
    justify-content: flex-end;
    /* Order by top right */
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.tm-orderby {
    padding: 8px 12px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}

/* Product Grid */
.tm-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 Columns */
    gap: 30px;
}

.tm-product-item {
    /* The Elementor template should handle the card style, 
       but we ensure it takes full width of the grid cell */
    width: 100%;
    position: relative;
    isolation: isolate;
}

.tm-product-item a {
    position: relative;
    z-index: 10;
    cursor: pointer;
    pointer-events: auto;
    display: block;
}

.tm-pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    gap: 5px;
}

.tm-pagination a,
.tm-pagination span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.tm-pagination span.current,
.tm-pagination a:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Loader */
.tm-loader {
    text-align: center;
    padding: 40px 0;
}

.tm-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #000;
    animation: tm-spin 1s ease-in-out infinite;
}

@keyframes tm-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .tm-products-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 Columns on Tablet */
    }
}

@media (max-width: 768px) {
    .tm-shop-container {
        flex-direction: column;
    }

    .tm-shop-sidebar {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .tm-products-grid {
        grid-template-columns: 1fr;
        /* 1 Column on Mobile */
    }
}